Skip to content

Instantly share code, notes, and snippets.

@GeneralTesler
Created August 17, 2020 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GeneralTesler/9108d1d6255a4b81ca20b27666d49ed5 to your computer and use it in GitHub Desktop.
Save GeneralTesler/9108d1d6255a4b81ca20b27666d49ed5 to your computer and use it in GitHub Desktop.
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