I'm trying to find a way to get the source code of a video from a page and safe it into a variable in JavaScript. I already tried many ways, but every time I get "undefined" back.
<video width="800" height="450" style="width: 100%;" class="video" data-ended="/lernen/00/done"
src="/media/video/99.webm">
<source type="video/mp4" src="/media/video/99.mp4">
</object>
</video>
I tried this, and thought that would look for the source within the class and store it in the variable. I just started using JavaScript today,
var src = document.getElementsByClassName("video").src