I’m doing it using Flash, however I also need same approach using HTML5. If it is not possible, is there any work around for this issue?
This is not what i want but I tried playing real video when ad video ends using onend event listener, but it didn’t work.
<script type="text/javascript">
var nextVideo = "http://....../real_video.mp4";
var videoPlayer = document.getElementById('videoPlayer');
videoPlayer.onend = function(){
videoPlayer.src = nextVideo;
}
</script>
<video id="videoPlayer" width="320" height="240" controls="controls">
<source src="http://.../ad_video.mp4" type="video/mp4" />
</video>
First I thought that the mistake is that
I changed it to
But that doesn’t work either.
Finally I add eventlistener as below and it worked.