Is it possible to activate subtitles on loading

Is there a way to activate subtitles on loading of the player through the SDK (javascript)? We want to show them without user manipulations.

Hi @jean-sebastien.rouet , thanks for your question. Yes it is possible to achieve this.

  • Bitmovin player exposes SubtitleAdded event. This event is fired by player when a subtitle track is added/detected by player and is available for use. Application can listen to it and use player.subtitles.enable API to enable the subtitle without user action.

  • In case multiple subtitle tracks are present and application needs to select one to enable, app can call player.subtitles.list API to list all available subtitles and call player.subtitles.enable API to enable the desired subtitle out of the list. Please make sure to call list API after player has entered SourceLoaded or Ready state.

  • Similarly, subtitles can be disabled via API player.subtitles.disable

  • Additionally there are events SubtitleEnabled and SubtitleDisabled to check programatically when subtitles are enabled and disabled respectively.

Please take a look as SubtitleAPI and PlayerEvents documentation for other subtitle related information.

Hi @jean-sebastien.rouet , I hope above information helped answer your question. Can we mark it as a solution please?

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.