Show Menu
TOPICS×

Overview

You can control the visibility of closed captions. When visibility is on, the currently selected track is displayed. If you change which track is current, the visibility setting remains the same.
If closed caption text is displayed when the player enters the seek mode, the text no longer displays after the seek completes. Instead, after a few seconds, TVSDK displays the next closed caption text in the video after the ending seek position.
The visibility values for closed captions are defined in MediaPlayer.Visibility . >
enum Visibility { 
   VISIBLE,  
   INVISIBLE 
}
```>

  1. Wait for the MediaPlayer to have at least the PREPARED state (see Wait for a valid state ).
  2. To get the current visibility setting for closed captions, use the getter method in MediaPlayer, which returns a visibility value.
    Visibility getCCVisibility() throws IllegalStateException;
    
    
  3. To change the visibility for closed captions, use the setter method, passing a visibility value from MediaPlayer.Visibility .
    For example:
    mediaPlayer.setCCVisibility(Visibility.VISIBLE);