Skip to content

Instantly share code, notes, and snippets.

@cwetanow
Created April 25, 2020 10:12
Show Gist options
  • Save cwetanow/a90bee3bcf49f00b22bde934b66a4058 to your computer and use it in GitHub Desktop.
Save cwetanow/a90bee3bcf49f00b22bde934b66a4058 to your computer and use it in GitHub Desktop.
let captionsForVideo = document.querySelectorAll('div.cue');
let texts=[];
for(let i=0; i<captionsForVideo.length; i++){
texts.push(captionsForVideo[i].innerText);
}
let text = texts.reduce((prev,text)=> prev + ' ' + text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment