Skip to content

Instantly share code, notes, and snippets.

@willdowglas
Last active December 21, 2020 05:55
Show Gist options
  • Select an option

  • Save willdowglas/7d5e785d6496d22aaf6cba4e0dcbea75 to your computer and use it in GitHub Desktop.

Select an option

Save willdowglas/7d5e785d6496d22aaf6cba4e0dcbea75 to your computer and use it in GitHub Desktop.
set video to fullscreen and playback rate to 2.0
const el_id = "video-player_html5_api"
let element = document.getElementById(el_id)
element.addEventListener("play", my_configs)
element.addEventListener("ended", document.exitFullscreen())
function my_configs() {
element.requestFullscreen()
element.playbackRate = 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment