Skip to content

Should we revisit and document getUserMedia() track order? #1028

@jan-ivar

Description

@jan-ivar

The spec says: "The tracks of a MediaStream are stored in a track set. The track set MUST contain the MediaStreamTrack objects that correspond to the tracks of the stream. The relative order of the tracks in the set is User Agent defined and the API will never put any requirements on the order. The proper way to find a specific MediaStreamTrack object in the set is to look it up by its id."

But #1020 is concerned about deterministic event order between track clones, looking at using track creation order.

If we're chasing determinism at this level, might getUserMedia need to be clearer about whether it creates its audio or video track first?

I suspect audio comes first, given "2. Let requestedMediaTypes be the set of media types in constraints with either a dictionary value or a value of true... 11.3 For each media type kind in requestedMediaTypes ...", and the fact that dictionary members are sorted lexographically.

While use of the word "set" in the sentences above do not link to set, they might be understood to mean the same thing. It reads:
Image

Thankfully, an implementation check reveals the same order in all browsers: audio, video. Is it time to document this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions