Open ossipoff opened 4 years ago
+1 Same problem
I have run into the same problem. It is happening with a number of webrtc type applications. Does any one know of a solution to this problem?
Here is something that I found on iOS 14:
Important changes to iOS 14 networking affecting relayed sessions
With iOS 14, Apple introduces local network privacy.
Beginning in iOS 14, the operating system will prompt the user for permission when an application attempts to subscribe to clients on the same local network in a relayed session.
If your application uses a relayed session, it is encouraged to add a descriptive custom usage string to inform the user why the application needs access to their local area network. The Video API uses the local network to discover and connect to video participants on your same network where possible.
If the user does not accept the permission, the attempt to subscribe will fail. After the permission is rejected, any future attempts to subscribe to clients on the same network will also fail unless the user changes the permission in Settings. Unfortunately, iOS does not provide an API for an application to determine if the user has accepted or rejected this permission.
Hopefully this information will help solve for a solution. If someone has one, please post it.
+1 - having the same problem. I'm able to stream to users but unable to switch cameras on iOS. Any insights how does one go about it?
Chai2, are you still able to stream to users using iOS 14? If so, how are you doing it? Can you post something or we can reach out to one another. I have the ability to switch cameras on iPads and iPhones figured out.
@gh264367 - I just realized I'm on 13.7 and can stream. Let me update to 14.0.1 and see if it still works.
Nope, just tested it out. And, all I see is a blank screen.
@gh264367 I also found a note regarding the ios 14 issue here https://tokbox.com/developer/sdks/ios/release-notes.html it seems as though it is related to peer-to-peer connections. We are using xirsys for stun and turn. I have tried to use turn servers only, but still have the same issue.
This seems to be a permission thing with iOS 14 on the local network of the device, from researching for peer to peer in webrtc. Some how you have to ask permission within Safari to connect to the local network of the device.
I have done some searching and testing, and found an example of webrtc that actually works on ios 14: https://apprtc.appspot.com/
I found it in the bottom of this list of samples: https://webrtc.github.io/samples/
the source code for it is here: https://github.com/webrtc/apprtc/
it will take some time to rummage through all the source and find out what makes this one work compared to rtcmulticonnection. I probably won't have the time for it in the near future
Thanks, @ossipoff. I just tried and it works as expected. I will keep looking at where in this repo need to be patched.
More information if anyone is interested - It's confirmed - related to Local network permissions.
WebRTC - https://bugs.chromium.org/p/webrtc/issues/detail?id=11859 Details info - https://developer.apple.com/videos/play/wwdc2020/10110/
Same Problem here.
Same Problem after upgrade to ios 14
before, on ios 13, project work perfect
Twillio is aware of the issues as well, it's seem best to avoid local network at all for ios14 device
@altezza04 do you have an idea of how to avoid the local network in rtcmulticonnection? I have tried only using turn servers, but that didn't work. I am no expert in webrtc, but I guess it has to do with the way it is handling ICE candidates
@altezza04 do you have an idea of how to avoid the local network in rtcmulticonnection? I have tried only using turn servers, but that didn't work. I am no expert in webrtc, but I guess it has to do with the way it is handling ICE candidates
no idea actually, may need some way to forcing a relayed connection in Peer-to-Peer Rooms to avoid using the local network.
Any solutions so far?
GUYS, I found the solution to it
the problem is in getRMCMediaElement function.
comment out
mediaElement.srcObject = stream;
this line and it will work. the reason might be is that you cant create more than 1 media element with local stream
maybe someone can come with a much cleaner approach
@fmangat , that sounds great! I will try it out
I found that setting the autoCreateMediaElement property to false on the connection object also works
I have the same problem.
It seems Apple has made some changes in iOS 14 that are not playing nice with RTCMultiConnection.
I have tested all the demos at https://rtcmulticonnection.herokuapp.com/demos/, but none of them are working.
Not entirely sure what the problem is, it doesn't seem like any errors are logged to the console, but the local video stream is never shown and is not sent to the recipient either.
Local audio stream seems to be working, also remote audio and video streams are displayed on the iOS 14 device.
It doesn't seem to be a general problem with getUserMedia or something like that, the following getUserMedia example is working fine: https://webrtc.github.io/samples/src/content/getusermedia/gum/