Reputation: 63
In an HbbTV application I am trying to get the currentTime
of the video/broadcast
object using the MediaSynchroniser
object.
I have declared all needed objects, initialized the application, and made sure the a/v broadcast object is in the presenting state.
...
<object id="appmgr" type="application/oipfApplicationManager"></object>
<object id="broadcast" type="video/broadcast"></object>
<object type="application/hbbtvMediaSynchroniser" id="msync"></object>
...
Then I try to get the currentTime
as follows:
function initMediaSync() {
var msync = document.getElementById('msync');
var broadcast = document.getElementById('broadcast');
if (typeof msync.initMediaSynchroniser === "function") {
try {
msync.initMediaSynchroniser(broadcast, "urn:dvb:css:timeline:pts");
setInterval(function () {
log("Current Time: " + msync.currentTime);
}, 1000)
// setTimeout(switchVideo, 10000)
} catch (e) {
log('Error in media synchronisation: ' + e.message);
}
} else {
log("Media Synchroniser not supported.");
}
}
Note: log
is a previously defined function in order to debug the HbbTV application.
However, I'm always getting NaN
as the msync.currentTime
. What am I missing?
According to ETSI TS 103-736-1 - V1.1.1 (page 35, section 10.2.3) I should be able to use "urn:dvb:css:timeline:pts"
as my timelineSelector
.
When originalMediaObject is a video/broadcast object, PTS ("urn:dvb:css:timeline:pts") [...] shall be supported.
Upvotes: 0
Views: 30