0

I must use tag object type="video/mp4" in my project for hbbtv, and I want detect end of movie in vanilia JS. How can i do it?

macMod
  • 1
  • 2
  • I think this is covered by the CE-HTML spec, but I don't have a copy or the desire to pay for one. – Quentin Sep 14 '17 at 10:04
  • Hi, thanks for answer. This documentation ce-html is use on all smart tv with hbbtv? Some people have tv from 2012 and i have to use old old old javascrip, to launch the application. – macMod Sep 14 '17 at 10:35

2 Answers2

0

document.getElementById('objectId').addEventListener('ended',endCallback,false);

function endCallback(e) {
       //Action
}
Atul Sharma
  • 9,397
  • 10
  • 38
  • 65
0

When using the AVControl object, you have to register the PlayStateChange event and check playState 5 (Finished).

    document.getElementById('objectId').onPlayStateChange = function() {
    if (document.getElementById('objectId').playState == 5) {  // FINISHED }
    };

http://www.oipf.tv/docs/OIPF-T1-R2_Specification-Volume-5-Declarative-Application-Environment-v2_3-2014-01-24.pdf 7.14.1 The A/V Control object