jitsi / lib-jitsi-meet

A low-level JS video API that allows adding a completely custom video experience to web apps.
Apache License 2.0
1.34k stars 1.11k forks source link

Safari 15 (up to 15.4) cannot see remote streams #1738

Open jerry2013 opened 3 years ago

jerry2013 commented 3 years ago

This Issue tracker is only for reporting bugs and tracking code related issues.

Before posting, please make sure you check community.jitsi.org to see if the same or similar bugs have already been discussed. General questions, installation help, and feature requests can also be posted to community.jitsi.org.

Description


On beta.meet.jit.si, using Safari 15 (release) or tech preview (15.4) together in a meeting with Chrome, Safari cannot see the VP9 streams from Chrome.

Current behavior


Safari 15 cannot receive (or decode) video from Chrome. Chrome can see vp9 stream from Safari.

Expected Behavior


Safari should be able to have normal video call with other browsers, ideally vp9 both ways.

Possible Solution


If vp9 is no good, bring everyone to vp8

Steps to reproduce


Environment details


jerry2013 commented 3 years ago

Update - I just tried checking the underlying peer connection - turns out the remote media track is valid (I can render the receiver.track)

The actual problem is when the this.peerconnection.addEventListener('track', this.onTrack); fires, the SDP (from this.peerconnection.remoteDescription.sdp) does not yet contain the transceiver's mid.

Then, after the offer/answer cycle, APP.conference._room.getActivePeerConnection().peerconnection.remoteDescription.sdp does have the remote's mid.

So, the problem is just track event fires too early on Safari 15. I can't figure out if this is what is in the spec or Safari just wants to be different.

Can someone check?

Thanks.

jerry2013 commented 3 years ago

one more update - this.peerconnection.setRemoteDescription resolves after the ontrack event fires.

saghul commented 3 years ago

Ping @jallamsetty1

jallamsetty1 commented 3 years ago

@jerry2013 Safari 15 does seem to support VP9 and I am able to see video for other users using Chrome and doing VP9. Please note that if VP9 is not supported on Safari all the other endpoints in the call automatically fallback to VP8. I am not able to reproduce this issue on Safari Version 15.0 (16612.1.29.41.4, 16612).

jerry2013 commented 3 years ago

Right - I have trouble with Safari on iOS 15.0.1 and Safari TP release 133 (15.4) on Mac - apparently the original 15.0 worked for a coworker of mine as well.

jallamsetty1 commented 3 years ago

Thanks @jerry2013 I am able to reproduce the issue with STP 133. Your analysis that the track event fires before the this.peerconnection.setRemoteDescription promise resolves matches with what I am seeing as well. Technically the track event is fired as soon as sRD on the peerconnection is done but I am not sure why we can't find the matching ssrc for the media stream associated with the track event.

fippo commented 3 years ago

VP9 is apparently not ready yet, specifically https://bugs.webkit.org/show_bug.cgi?id=231071 but probably also https://bugs.webkit.org/show_bug.cgi?id=231074

If this started with 15.0.1 but wasn't reproducible in 15.0 it might be due to the change from https://bugs.webkit.org/show_bug.cgi?id=230604