Coder Social home page Coder Social logo

Comments (3)

chrisguttandin avatar chrisguttandin commented on June 5, 2024

Hi @chadacious,

thanks for your interest in this project. Currently the TimingTextTrack is not part of this project but I'm definitely interested in adding it. So far only the TimingObject itself is implemented and none of the other objects which expose a timingSrc property.

Can you maybe elaborate a bit more on your use case.

from timing-object.

chadacious avatar chadacious commented on June 5, 2024

I've been using the video element's addTextTrack for managing subtitle and metadata cues, but I'm finding that their events are not firing at the level of accuracy I am looking for. Frame accuracy would be great, but if I could at least get 8ms or less that should be good for my purposes.
As an example, in chrome my results show that most often the onenter and onexit events are firing right on time (e.g. 0.8ms), but then at random times it can be delayed by as much as 250ms which isn't acceptable for my requirements.
I'm looking at a number of options but was intriqued by the timingsrc project and your efforts as well so thought I would give it a look through.

from timing-object.

chrisguttandin avatar chrisguttandin commented on June 5, 2024

There could, of course, be a bug somewhere in Chrome's implementation of the video element but in general events fired on the main thread do not have a reputation of being very accurate. Whenever there is something which keeps the JavaScript engine busy there is no chance to fire an event. There is no way to avoid that. I'm therefore not really sure if the TimingTextTrack would help you, if that's the problem you have.

But again, as already said this could, of course, also be something in Chrome's implementation which prevents the events from being triggered timely. I just don't know it.

May I ask what you are trying to trigger with such an accuracy? To accurately trigger sounds the Web Audio API does for example allow to schedule things upfront. The actual timing is then handled in another thread and is therefore immune to potential performance bottlenecks on the main thread. Maybe a similar approach would work for you as well.

from timing-object.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.