After setting up a RTCPeerConnection in Safari 15, if you switch to another application and then return back to the website, the video screens are black. This behavior can be seen on the https://webrtc.github.io/samples/src/content/peerconnection/pc1/ sample page.
The steps to reproduce this bug are:
1. Open https://webrtc.github.io/samples/src/content/peerconnection/pc1/
2. Click the "Start" button, allow microphone and camera access when prompted, then press the "Call" button
3. Switch to another application for 3-5 seconds
4. Return to the Safari and observe that both video screens are black
Expected behavior: After backgrounding Safari and coming back, video resumes.
Able to reproduce with iOS 15.1 beta. Unable to reproduce with iOS 15.0.
I was able to reproduce this issue too on iOS 15.1 (19B74).
Alternate reproduction steps:
* Open https://webrtc.github.io/samples/src/content/peerconnection/pc1/
* Click Start button
* Grant access to microphone and camera
* Notice video is captured
* Make a call to the iPhone
* From Call UI dialog, decline it
* Notice that video doesn't get auto-resumed, instead you see a black rectangle where video used to be
Full disclosure: I shared the same steps in https://bugs.webkit.org/show_bug.cgi?id=230922 cause I don't know if the two bugs are related.
This should now be fixed in iOS 15.3