I wrapped a youtube video into video tag via MediaElement.js:
<video id="v" width="640" height="360">
<source src="http://www.youtube.com/watch?v=nOEw9iiopwI" type="video/youtube" >
</video>
It can be played correctly. I want to detect the play event (assume jQuery loaded):
$("#v").on('play', function() {
console.log('play event entered');
// do something more here
});
});
It seems the event can't be detected correctly. Is it because of the cross-origin issue? If so, theoretically I can build a proxy server for videos and then detect it correctly?
What I ultimately want to do is load the youtube clips into canvas. Any suggestion?