Skip to content

Instantly share code, notes, and snippets.

@dmlap
Created May 22, 2013 18:32
Show Gist options
  • Select an option

  • Save dmlap/5629805 to your computer and use it in GitHub Desktop.

Select an option

Save dmlap/5629805 to your computer and use it in GitHub Desktop.
Log out the value of the `src` attribute of a video element.
<!doctype html>
<html>
<head>
<title></title>
</head>
<body>
<video src="http://brightcove.vo.llnwd.net/e1/uds/pd/507017973001/507017973001_1247361339001_shark-1080p.mp4?playerId=558043668001&lineupId=&affiliateId=&pubId=507017973001&videoId=1247311399001"></video>
<script>
var video = document.querySelector('video');
console.log(video.src); // logs the video URL
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment