Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Enable subtitles on Funimation web player

Enable subtitles on Funimation web player using VideoJS addRemoteTextTrack

// get the player iframe 
var frame = document.getElementsByTagName("iframe")[0].contentWindow
// get the videojs object inside the iframe 
// fp is the instance of the FunimationPlayer inside the iframe and stores the text track info
//     vtt is usually the first item in the text track list
frame.videojs.getPlayer("brightcove-player").addRemoteTextTrack(frame.fp.currentVideo.source.textTracks[0])

address bar one-liner

javascript:var frame = document.getElementsByTagName("iframe")[0].contentWindow;frame.videojs.getPlayer("brightcove-player").addRemoteTextTrack(frame.fp.currentVideo.source.textTracks[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment