question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getUserMedia and RTCPeerConnection gives problems in iOS 11.2.5 on Safari

See original GitHub issue

Same WebRTC app with Angular (and zone.js patches) gives problems, without Angular no problem.

I am not sure if this is really zone.js related to be honest. When I read all the stuff I found here, I think it is. I miss the knowledge with zone.js to really investigate this, so hopefully you can help me.

I forked @benbro app from this issue. Then pc.component.html added playsinline to support Safari:

<video #localVideo playsinline autoplay muted></video>
<video #remoteVideo playsinline autoplay></video>

Upgraded zone.js 0.8.18 -> 0.8.20 and polyfills.ts added patches:

// rtc peer connection patch
import 'zone.js/dist/webapis-rtc-peer-connection';
// getUserMedia patch
import 'zone.js/dist/zone-patch-user-media';

App: https://webrtc-angular-test.stackblitz.io/

Editor: https://stackblitz.com/edit/webrtc-angular-test

Tested this app in iOS Safari (version 11.2.5) on a iPhone 6 (A1586) and iPad mini 2 (A1489).

In both situations this is the behaviour:

The ‘Start’ button works fine. When I give permission localStream is visible. After the ‘Call’ button is pressed the localStream freezes. The remoteStream is visible normal. No error messages in the console.

When I use the same on plain html and javascript no freezes of localStream occurs:

App: https://run.plnkr.co/plunks/z4BJ5OJxFM5WQp7ndD6g/

Editor: https://plnkr.co/edit/z4BJ5OJxFM5WQp7ndD6g

This Plunker is the same as https://webrtc.github.io/samples/src/content/peerconnection/pc1 but with playsinline added

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:30 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
MickLcommented, Jan 23, 2020

Im facing the same issue described here https://stackoverflow.com/questions/48654523/tokbox-subscriber-time-out-error-on-safari where I can publish my video but not subscribe with using @opentok/client in Safari. Outside of Angular it works fine, and in Chrome and Firefox too.

Adding polyfill zone.js/dist/webapis-rtc-peer-connection works but I wonder what is the problem and if this could be solved 2 years later? Also what is the zone.js/dist/zone-patch-user-media for? I did not have any other problems.

Version:

Safari: 13.0.4
@angular/core: 8.2.14
zone.js: 0.9.1
@opentok/client: 2.16.4
2reactions
JiaLiPassioncommented, Feb 14, 2018

@hermanfransen , I will check this one this weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS 15 Safari WebRTC Issue | Apple Developer Forums
We're encountering an issue on the iOS 15 Beta when establishing a WebRTC connection through Safari, where we are not receiving the remote...
Read more >
WebRTC does not work in Angular 5 on iOS Safari
After giving permission on iOS localStream is visible. When the RTCPeerConnection is established the remoteStream is normal visible on iOS and ...
Read more >
Why does iOS keep asking for camera permissions?
iOS has a somewhat heavy-handed implementation of user permissions for camera access in the Safari browser. The permissions are not persistent ...
Read more >
Guide to WebRTC with Safari in the Wild (Chad Phillips)
Chad Phillips provides a detailed list of Safari caveats and gotcha's ... getUserMedia() requests, you are likely in for problems with iOS.
Read more >
Support WebRTC in Safari in-app browser - WebKit Bugzilla
User clicks the link and is taken to Safari in-app version of the browser. getUserMedia is not supported here, so call fails. We...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found