Closed Captioning (CC) APIs enable you to get/set supported closed captions and localize the Player UI language.
- iOS Web - Because of the way that closed captions are supported in iOS, we are not able to add closed caption data for iOS web for remote assets.
- Live Streaming - For live streaming on HTML5 players, if closed caption data is available in the stream and the underlying platforms supports it (as iOS does) then closed captions are displayed. The player does not facilitate the display of closed captions. If closed captions already exist in the stream, the player will not prevent them from appearing during playback.
For closed captioning to work with live streams, you need to run the broadcast stream through your encoder to convert the stream and include Adobe Flash onCuePoint Data. The onCuePoint Data can be inserted by many encoders, such as the Cisco 8100 series media encoders. You must configure the source encoder to convert the CEA format to the cue points format to include closed captions and to have them work properly. The process begins with the capture and encoding of the live stream. The live stream is also converted to have include the Flash cue points inside the stream. The stream is passed as an RTMP stream (as is) or as an Akamai HD2 live stream and is then passed to the Ooyala player.
The player supports a number of LTR and RTL languages for close captioning and UI localization. You can review this list in the topic "Supported Closed Caption Languages".
Live Stream Closed Captions with Custom OPF Modules
If you are working with an Ooyala Player Framework (OPF) module (Player V3 Flash-based) that you want to include in Player V3 and include live stream closed captioning, you will need to use the Ooyala Closed Caption APIs. For more information about creating OPF modules, contact Sales, your Customer Success Manager, or Technical Support.
- The module needs to check the available languages whenever this event goes off during live stream playback.
- Use getCurrentItemClosedCaptionsLanguages() to perform this check.
- If the live stream happens to add more languages to their available languages in the middle of stream playback, Ooyala also fires CLOSED_CAPTIONS_TEXT_READY.
- You can then enable closed captions as you would with VOD closed captions, using the setClosedCaptionsLanguage()function.