From a05dff5e1cdd821211c881f8c540b77cfca67203 Mon Sep 17 00:00:00 2001 From: aboba Date: Thu, 10 Nov 2016 17:14:24 -0800 Subject: [PATCH] Use of "stopped" in insertDTMF and replaceTrack Fix for Issue https://github.com/w3c/webrtc-pc/issues/917 --- webrtc.html | 54 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/webrtc.html b/webrtc.html index 44f4ef8a4..0d8f3665e 100644 --- a/webrtc.html +++ b/webrtc.html @@ -2184,14 +2184,12 @@

Methods

receiver.rtcpTransport.transport.state to "closed".

-
  • -

    All RTCRtpSenders in - senders are now considered stopped.

    -
  • -
  • -

    All RTCRtpReceivers in - receivers are now considered stopped.

    -
  • +

    Let transceivers be the result of executing the + CollectTransceivers algorithm. For every + RTCRtpTransceiver transceiver in + transceivers, set + transceiver.stopped to + true.

  • Set connection's [[isClosed]] slot to true.

    @@ -4974,9 +4972,6 @@

    RTCRtpSender Interface

    encoded and transmitted to a remote peer. When setParameters is called on an RTCRtpSender object, the encoding is changed appropriately.

    -

    An RTCRtpSender can be stopped, which indicates that it will no longer - send any media.

    To create an RTCRtpSender with a MediaStreamTrack, track, a list of MediaStream objects, streams, and @@ -5220,24 +5215,25 @@

    Methods

  • Let sender be the RTCRtpSender object on which replaceTrack is invoked.
  • +
  • +

    Let transceiver be the + RTCRtpTransceiver object associated with + sender.

    +
  • Let connection be the RTCPeerConnection object that created sender.

  • -

    If sender is stopped, return a promise - rejected with an InvalidStateError.

    +

    If transceiver.stopped is + true, return a promise rejected + with an InvalidStateError.

  • Let withTrack be the argument to this method.

  • -
  • -

    Let transceiver be the - RTCRtpTransceiver object associated with - sender.

    -
  • If withTrack.kind differs from the transceiver kind of transceiver, return a @@ -6145,7 +6141,7 @@

    Attributes

    of this transceiver will no longer send, and that the receiver will no longer receive. It is true if either stop has been called or if setting the local or remote description has - caused the RTCRtpReceiver to be stopped.

    + caused the RTCTransceiver to be stopped.

    direction of type RTCRtpTransceiverDirection, @@ -8147,8 +8143,17 @@

    Methods

    1. let sender be the RTCRtpSender used to send DTMF.
    2. -
    3. If sender has been stopped, throw an - InvalidStateError exception.
    4. +
    5. +

      Let transceiver be the + RTCRtpTransceiver object associated with + sender.

      +
    6. +
    7. If transceiver.stopped is + true, throw an InvalidStateError + exception.
    8. +
    9. If transceiver.currentDirection + is recvonly or inactive, + throw an InvalidStateError exception.
    10. Let tones be the method's first argument.
    11. If tones contains any unrecognized characters, throw an InvalidCharacterError @@ -8170,8 +8175,11 @@

      Methods

      these steps; otherwise queue a task that runs the following steps (Playout task):
        -
      1. If sender has been stopped, abort these - steps.
      2. +
      3. If transceiver.stopped is + true, abort these steps.
      4. +
      5. If transceiver.currentDirection + is recvonly or inactive, + abort these steps.
      6. If toneBuffer is an empty string, fire an event named tonechange with an