W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > July 2019

Re: [webrtc-pc] Make stop() safe, affecting createOffer only. Replace attributes with "stopped" direction. (#2220)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Mon, 15 Jul 2019 21:54:49 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-511584864-1563227688-sysbot+gh@w3.org>
Removes `reject()`, and incorporates @henbos's changes proposed at the tail of our last VI, which simplifies by removing the **stopped** and **stopping** attributes in favor of a single `"stopped"` direction.

So instead of reading a **stopping** attribute, use:
if (tc.direction == "stopped") {
Instead of reading the old **stopped** attribute (which now only happens from SRD) use:
if (tc.currentDirection == "stopped") {

Keeps the old `stop()` method, unless there's appetite for `direction = "stopped"`? (throws now)
console.log(tc.direction);        // stopped
console.log(tc.currentDirection); // sendrecv
console.log(tc.direction);        // stopped
console.log(tc.currentDirection); // stopped
Note how the final value of `currentDirection` is now `"stopped"` rather than `null`. 🤘

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/pull/2220#issuecomment-511584864 using your GitHub account
Received on Monday, 15 July 2019 21:54:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:22:25 UTC