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.

TIP

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.

NOTE

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);
    

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now