Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

creating an RTPSender with a track whose readyState is 'ended' #278

@fippo

Description

@fippo

When attempting to create an RTPSender with a track whose readyState is 'ended' (e.g. because track.stop() has been called or the user unplugged the webcam) what should happen?

Since that state can't be left (see http://w3c.github.io/mediacapture-main/#methods-1) it does not seem useful to 'send' this track to the remote peer.

This affects two sections in the spec, first the constructor @ http://ortc.org/wp-content/uploads/2015/10/ortc.html#rtcrtpsender-operation*
I would propose the following change:
If an attempt is made to construct an RTCRtpSender object with transport.state or rtcpTransport.state "closed" or the track.readyState is "ended", throw an InvalidStateError exception.

Second, the setTrack method @ http://ortc.org/wp-content/uploads/2015/10/ortc.html#methods-3
How about this for the new step 3.2 before the current step 3.2?
If withTrack.readyState is "ended", then reject p with ToBeDefinedMediaStreamTrackError and abort these steps.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions