Show Menu
TOPICS×

Control closed-caption visibility

You can control the visibility of closed captions. When visibility has been enabled, 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 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 be in at least the PREPARED status. For more information, see Wait for a valid status .
  2. To get the current visibility setting for closed captions, use the getter method in MediaPlayer , which returns a visibility value.
    MediaPlayer.Visibility getCCVisibility() throws MediaPlayerException;
    
    
  3. To change the visibility for closed captions, use the setter method, passing a visibility value from MediaPlayer.Visibility .
    For example:
    mediaPlayer.setCCVisibility(MediaPlayer.Visibility visibility);