- From: henbos via GitHub <sysbot+gh@w3.org>
- Date: Tue, 03 Jul 2018 17:09:15 +0000
- To: public-webrtc-logs@w3.org
@aboba `currentDirection` would have been what you want except this is not set when you set the offer with `setRemoteDescription()`, rather it is set half-way through the answer (`setLocalDescription(answer)`). This is unlike the `ontrack` events, the legacy APIs and as far as I understand something you don't event have to do in order to receive early media. ``` let transceiver = pc.addTransceiver('audio'); // O/A cycle; we are offering to receive await pc.setRemoteDescription(offer); // Early media is possible, and [[Receptive]] true, // but transceiver.currentDirection is still null await pc.setLocalDescription(await pc.createAnswer()); // Now transceiver.currentDirection is updated ``` @alvestrand `[[Receptive]]` sounds more like it, though it is set at `setLocalDescription()` so a receiver is said to be receptive if we are prepared to offer and only becomes non-receptive when we `setRemoteDescription()`. Meaning: ``` let transceiver = pc.addTransceiver('audio'); await pc.setLocalDescription(await pc.createOffer()); // transceiver.[[Receptive]] is true ``` It would seem strange to get an "active receiver" every time you do `addTrack()`, even if it's never used. -- GitHub Notification of comment by henbos Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1920#issuecomment-402228488 using your GitHub account
Received on Tuesday, 3 July 2018 17:09:18 UTC