W3C home > Mailing lists > Public > public-web-and-tv@w3.org > June 2018

Re: [media-and-entertainment] Frame accurate seeking of HTML5 MediaElement

From: Snarkdoof via GitHub <sysbot+gh@w3.org>
Date: Fri, 15 Jun 2018 19:44:16 +0000
To: public-web-and-tv@w3.org
Message-ID: <issue_comment.created-397723790-1529091855-sysbot+gh@w3.org>
@nigelmegitt Compensating for the transfer time between player and JS execution can, as I probably worded badly, be compensated for by adding a timestamp for when the even was created (or the data "created" if you wish). A timestamp should in my opinion be added to ALL events, in particular media events - one can then see that 32ms ago the player was at position X, which means that you can now be quite certain that the player is at X+32ms right now. :)

I don't have any data to back up the resource claim, but logic dictates that any code looping at high frequency will necessarily keep the CPU awake. For many devices, video decoding is largely done in HW, and keeping CPUs running on lower power states is terribly important. My largest point really is that if we export the clock properly (e.g. performance now + currentTime), it's trivial to calculate the correct position at any time in JS. This makes it very easy to use timeouts to wake up directly from JS.

I've got a suspicion that you are not really looking for ways to use JS to cover your needs in regards to timed data but rather to have built in support in the players and use Data Cues etc. Just to be clear - the JS sequencer @ingararntzen has mentioned typically wakes up and provides callbacks with well under 1ms error on most devices - if that doesn't cover all subtitle needs, I don't know what kind of eye sight you guys have. ;-) We have larger issues with CSS updates (e.g. style.opacity=1) taking longer on slower devices (e.g. Raspberry Pis) than we do with synchronizing the actual function call.

GitHub Notification of comment by Snarkdoof
Please view or discuss this issue at https://github.com/w3c/media-and-entertainment/issues/4#issuecomment-397723790 using your GitHub account
Received on Friday, 15 June 2018 19:44:19 UTC

This archive was generated by hypermail 2.3.1 : Friday, 15 June 2018 19:44:20 UTC