Package com.brightcove.player.controller
Class BrightcoveAudioTracksController
java.lang.Object
com.brightcove.player.event.AbstractComponent
com.brightcove.player.controller.BrightcoveAudioTracksController
- All Implemented Interfaces:
Component
@ListensFor(events={"audioTracks","enterTvMode","hidePlayerOptions"})
@Emits(events={"audioTracksDialogOk","selectAudioTrack"})
public class BrightcoveAudioTracksController
extends AbstractComponent
A controller class for managing audio tracks dialog windows.
-
Field Summary
Fields inherited from class com.brightcove.player.event.AbstractComponent
eventEmitter, listenerTokens
-
Constructor Summary
ConstructorDescriptionBrightcoveAudioTracksController
(BaseVideoView videoView, android.content.Context context) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Hide audio tracks menu for Android TV.protected void
Init audio tracks menu for Android TV.protected void
selectAudioTrack
(int trackIndex) Selects audio track and emits the track selected.void
Helper that prepares the audio tracks dialog with the current state and displays the dialog over the video player.protected void
Show audio tracks menu for Android TV.Methods inherited from class com.brightcove.player.event.AbstractComponent
addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
-
Field Details
-
context
protected android.content.Context context
-
-
Constructor Details
-
BrightcoveAudioTracksController
Constructor- Parameters:
videoView
- A video view in charge of media playback.context
- The context of the main application's activity.
-
-
Method Details
-
showAudioTracksDialog
public void showAudioTracksDialog()Helper that prepares the audio tracks dialog with the current state and displays the dialog over the video player. -
selectAudioTrack
protected void selectAudioTrack(int trackIndex) Selects audio track and emits the track selected.- Parameters:
trackIndex
- the track index
-
initAudioTracksLayout
protected void initAudioTracksLayout()Init audio tracks menu for Android TV. It initializes the Player option menu when necessary. -
showAudioTracksMenu
protected void showAudioTracksMenu()Show audio tracks menu for Android TV. -
hideAudioTracksMenu
protected void hideAudioTracksMenu()Hide audio tracks menu for Android TV.
-