the webrtc stream freezes periodically only on ios. iOS Safari V17
What did you expect to happen
no freeze :-)
How to reproduce
open up a stream on ios and just wait.
Additional information
Adding this to WebrtcGo2RtcCamera seems to fix the problem. For reference the .js code from https://github.com/AlexxIT/go2rtc/blob/master/www/video-rtc.js also does something similar and behaves in this way, when load up the stream.html in safari/chrome browser on iOS. Its not really dependent on browser on iOS as underlying webkit is the same.
...
this.ws.onmessage = this.onWebSocketMessage
this.ws.onclose = this.onWebSocketClose
this.pc.onconnectionstatechange = this.pcStateChange
}
// TODO: do we need this iOS keeps disconnecting?
pcStateChange(ev: Event) {
consola.debug('[WebrtcGo2RtcCamera] pcstate changes', ev)
const peerConnection = ev.target as RTCPeerConnection;
if (peerConnection && peerConnection.connectionState === "disconnected") {
// Do something when connection is disconnected
this.startPlayback();
}
}
...
Fluidd Version
devlop
Browser
Safari
Device
Mobile device (Phone, Tablet or similar)
Operating System
iOS
What happened
the webrtc stream freezes periodically only on ios. iOS Safari V17
What did you expect to happen
no freeze :-)
How to reproduce
open up a stream on ios and just wait.
Additional information
Adding this to WebrtcGo2RtcCamera seems to fix the problem. For reference the .js code from https://github.com/AlexxIT/go2rtc/blob/master/www/video-rtc.js also does something similar and behaves in this way, when load up the stream.html in safari/chrome browser on iOS. Its not really dependent on browser on iOS as underlying webkit is the same.