client-sdk-js
client-sdk-js copied to clipboard
IOS safari doesn't connect to a room.
SDK verion: 0.17.1 LiveKit server version: 15.5 IOS version: 15.3
Only in IOS safari the client can't connect to a room. If the client connects without publishing any media stream then after some time the connection happens. But if there is at least one publishing media stream, then seems like the client can't finish the connection.
Are you able to reproduce with the sample JS client?
@davidzhao Yeah, same behavior. The log window says "could not connect after timeout".
The first screenshot were taken from a PC, and the second from an iphone.
Ah I see the issue, you are loading the sample app over insecure HTTP. Mobile Safari does not allow media capture when it's running over an insecure connection.
Can you try going to https://example.livekit.io ?
Unfortunately, it is still the same. Also, the previous connection was working over HTTPS as well. Just out of curiosity, what made you think it was insecure?
Your initial screenshot shows Safari's address bar showing Not secure
Ahh, I am sorry, I was wrong. But anyway with the example.livekit.io it didn't work as well :(
interesting.. it's working well for me against our server. Can you share any debugging logs from mobile safari? here are instructions on how you could accomplish that.
[Log] connecting to – "wss://livekit.test.appercode.com/rtc?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NDk1MTY0MzksImlzcyI6IkFQSTlrRjNnQkNoaXRxV…" (2.972e1033.chunk.js, line 2)
"wss://livekit.test.appercode.com/rtc?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NDk1MTY0MzksImlzcyI6IkFQSTlrRjNnQkNoaXRxViIsImp0aSI6IlVzZXIgMSIsIm5iZiI6MTY0NjkyNDQzOSwic3ViIjoiVXNlciAxIiwidmlkZW8iOnsicm9vbSI6InJvb20xIiwicm9vbUpvaW4iOnRydWV9fQ.wJTg9gdoWYf8a9Orv6RRfDCl1QtcWGbr33l5Y0IkobM&sdk=js&version=0.17.1&protocol=6"
[Log] connected to Livekit Server version: 0.15.5, region: (2.972e1033.chunk.js, line 2)
[Log] room event – "stateChanged" – "connected" (2.972e1033.chunk.js, line 2)
[Log] received server offer – "offer" – "stable" (2.972e1033.chunk.js, line 2)
[Log] sending answer (2.972e1033.chunk.js, line 2)
That's it,the UI shows the error ("could not connect after timeout"). Might it be because the timeout too small and somehow it takes more time in safari to establish the connection?
closing issue as it's stale. please file a new issue if problem persists.