Skip to content

Instantly share code, notes, and snippets.

@arkon108
Created June 12, 2022 07:27
Show Gist options
  • Save arkon108/2179d1f0979199be55ac0f2b8041d9b6 to your computer and use it in GitHub Desktop.
Save arkon108/2179d1f0979199be55ac0f2b8041d9b6 to your computer and use it in GitHub Desktop.
// find the first video tag, select the src attr in the source tag which matches "video/mp4"
const s = document.querySelectorAll("video:first-child source[type='video/mp4'");
window.location = s[0].src;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment