JavaScript/JQuery - get src from Video Tag when it starts -
i need help. i'm developing webbrowser app , in app want play videos website in media element.
so need source. problem pages write source in src="" after starting video.
so need methode gives me src when video starts.
i hope understand me.
sorry bad english.
by
you add listener listens play
event:
document.getelementbyid('yourvideoid').addeventlistener('play', function() { console.log(this.src); });
or in jquery:
$('#yourvideoid').on('play', function() { console.log($(this).attr('src')); });
if video not have id or class like:
$('video').on('play', function() { console.log($(this).attr('src')); });
Comments
Post a Comment