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
    Modifier and Type | Field and Description
    --- | ---
    `protected android.content.Context` | `context`

    - ### Fields inherited from class com.brightcove.player.event.AbstractComponent

      `eventEmitter, listenerTokens`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BrightcoveAudioTracksController(BaseVideoView videoView, android.content.Context context)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `hideAudioTracksMenu()` Hide audio tracks menu for Android TV.
    `protected void` | `initAudioTracksLayout()` Init audio tracks menu for Android TV.
    `protected void` | `selectAudioTrack(int trackIndex)` Selects audio track and emits the track selected.
    `void` | `showAudioTracksDialog()` Helper that prepares the audio tracks dialog with the current state and displays the dialog over the video player.
    `protected void` | `showAudioTracksMenu()` Show audio tracks menu for Android TV.

    - ### Methods inherited from class com.brightcove.player.event.AbstractComponent

      `addListener, addOnceListener, getEventEmitter, removeListener, removeListeners`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### context

          protected android.content.Context context

  - ### Constructor Detail

    - #### BrightcoveAudioTracksController

          public BrightcoveAudioTracksController(BaseVideoView videoView,
                                                 android.content.Context context)

      Constructor
      Parameters:
        `videoView` - A video view in charge of media playback.
        `context` - The context of the main application's activity.

  - ### Method Detail

    - #### 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.