Re: [webrtc-pc] PC.local_description and friends - snapshot views or dynamic views? (#2977)

A quick test https://jsfiddle.net/jib1/gawh7eno/20/ shows the following in all browsers:
1. `pc.localDescription === pc.localDescription`
   -  caveat: use Firefox Nightly or `media.peerconnection.description.legacy.enabled`=false in about:config
3. `pc.localDescription` replaced by a new RTCSessionDescription upon `onicecandidate` with a candidate

This seems reasonable to me. `pc.localDescription` changes but `x.sdp` does not (which would seem like action at a distance).

In contrast the spec [says](https://w3c.github.io/webrtc-pc/#dfn-surface-the-candidate): _"add candidate to connection.[[[PendingLocalDescription]]](https://w3c.github.io/webrtc-pc/#dfn-pendinglocaldescription).sdp."_

 I vote we change the spec to match implementations.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2977#issuecomment-2151042946 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 5 June 2024 22:10:37 UTC