Coder Social home page Coder Social logo

Comments (5)

henbos avatar henbos commented on August 26, 2024

Shall I create a PR for...? @padenot @jan-ivar

interface MediaStreamTrackAudioStats {
    ...

    // Added in https://github.com/w3c/mediacapture-extensions/pull/124
    readonly attribute DOMHighResTimeStamp? latency;

    // New PR:

    readonly attribute DOMHighResTimeStamp? averageLatency;
    readonly attribute DOMHighResTimeStamp? minLatency;
    readonly attribute DOMHighResTimeStamp? maxLatency;

    // Resets min/max/average so that the next time `track.stats´ is called these values represent the
    // min/max/average since `resetLatency()` was called.
    void resetLatency();
};

Nullable because if we've just reset the latencies we don't have any latency measure to min/max/avg over.

from mediacapture-extensions.

jan-ivar avatar jan-ivar commented on August 26, 2024

Do we need nullable? Why not just set averageLatency = minLatency = maxLatency = latency at that point?

from mediacapture-extensions.

henbos avatar henbos commented on August 26, 2024

That would work, except that latency is not known until the first time that a measurement is made. So if you just called getUserMedia I don't think you necessarily know what the latency is yet. Unless you think the user agent could have some sensible default there

from mediacapture-extensions.

henbos avatar henbos commented on August 26, 2024

We could default it to 0 just to avoid nullables, the app could still check if deliveredFrames > 0 for this edge case

from mediacapture-extensions.

henbos avatar henbos commented on August 26, 2024

I think we can remove nullable, when it is reset min/max/avg = current latency. Since we removed nullable from current latency.

from mediacapture-extensions.

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.