Bug 234088

Summary: Browser returns "null" for remoteDescription on ontrack event
Product: WebKit Reporter: Jaya Allamsetty <jaya.allamsetty>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Major CC: youennf
Priority: P2    
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Jaya Allamsetty 2021-12-09 09:18:03 PST
The browser returns "null" when we query for the remoteDescription on the RTCPeerConnection immediately after the "track" event is fired.

Steps to reproduce:
1. Go to https://jsfiddle.net/fippo/1k5oayqc/1/show and run the fiddle.
2. Examine the output that gets printed. 
3. 'remoteDescription', 'currentRemoteDescription' and 'pendingRemoteDescription' are all null in the ontrack event handler.

Chrome and Safari 15.0 return valid values for 'remoteDescription' whereas Safari 15.1 and STP Release 133 return null.
This breaks Jitsi client's functionality and no remote tracks can be seen.
Comment 1 youenn fablet 2021-12-10 06:51:18 PST
I tried on STP 136, and in step 3, I got:
ontrack true false true
This seems expected.

I also tried on iOS 15.2 and got the same result.
Can you validate this?
Comment 2 Jaya Allamsetty 2021-12-13 07:22:57 PST
I just tested this in STP 136 (Release 136 (Safari 15.4, WebKit 16613.1.9.2), it's working fine there and I see the expected result. 
Does this mean that Safari 15.4 will work as expected ? We need to communicate the fixed version to our customers.
Comment 3 youenn fablet 2021-12-13 07:31:01 PST
I just tried on a recent Safari 15.2 beta and cannot reproduce there either.
Can you have a test there as well?

I am not sure what is going on there since we were not expecting changes in that area in Safari 15.
In recent WebKit/STP, we did improvements to closely align with the spec by copying descriptions at specific times, instead of asking the WebRTC backend for the description.

I'll mark as configuration changed then since it is working as expected in STP.
Comment 4 Jaya Allamsetty 2021-12-13 07:54:18 PST
Yes, this seems to be fixed in Safari 15.2 beta 3.