From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

AdQuestions

4
comments
88
views

Video state events not firing

Im using the AdForm video player and I'm trying to listen to when the video has stopped playing. The below is not working for me, any ideas ? VideoPlayer = Adform.Component.VideoPlayer; sources = dhtml.getVar('videoSources', [{ "file": "assets/coke_980x240.mp4" }, { "file": "assets/coke_980x240.webm" }, { "file": "assets/coke_980x240.ogv" }]); vp = VideoPlayer.create({ sources: sources, loop: false, muted: false, autoplay: true, poster: 'images/poster.jpg' }); if (vp) { vp.removeClass('adform-video-container'); vp.addClass('video-container'); vp.appendTo(video); } vp.on('state', function (state) { console.log('Video is now ' + state); });

Comments (4)
comments powered by Disqus