Created
          January 25, 2017 21:05 
        
      - 
      
 - 
        
Save umer936/22f68a510291cb59ba7342a0bff2397e to your computer and use it in GitHub Desktop.  
    Prints out the captions from a JW video
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | innerDoc = document.getElementsByClassName("jwplayer"); | |
| var getVideo = innerDoc[0].getElementsByTagName('video')[0]; | |
| for (index = 0; index < getVideo.textTracks[0].cues.length; ++index) { | |
| document.write(getVideo.textTracks[0].cues[index].text + " "); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment