You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is less of an issue with this library (which works nicely) and more of an issue with Twitter's handling of their in-app iOS browser and it's WebRTC support. However, I figured someone might be able to point me in the right direction and greatly appreciate the help. I was very excited when iOS Safari added support for WebRTC and quickly made it a part of my work. However, I noticed that in-app browsers can be hit or miss when it comes to supporting standards. Last time I checked, Twitter and Instagram's in-app browsers did not support WebRTC but Facebook's did. Anyway, it's pretty straight-forward to look at the browser user agent to detect if the user is coming from an in-app browser or Safari directly. However... Twitter's in-app browser has the same exact user agent as the standalone Safari browser... FML. In addition, WebRTC seems to fail silently on prompting and I can't figure out a way to figure out if it's working or not. An easy test is to direct message yourself the following link on Twitter and attempt to open it within the iOS app:
The only thought I had was to use a timer to detect if either a positive or negative WebRTC action occurred after a specified period of time. If neither occurred, I could assume that something went wrong and encourage the user to try a different browser.
Any help is much appreciated.
The text was updated successfully, but these errors were encountered:
Ok, here's a hacky solution which might work... it seems like when WebRTC fails in this manner, the in-app browser stops executing any code within the current function after the getUserMedia call. You can try the following Codepen which successfully alerts "before" and "after" in the iOS Safari browser but does not fire "after" in the iOS Twitter in-app browser.
So, perhaps we can set a variable of prompted originally to false and then set it to true if the "after" function gets called. Then if the prompt stays false, we would notify the user accordingly. Then again... maybe I'm just being dumb and there's a much simpler way of going about this.
WebRTC isn't implemented in a complete way outside of iOS safari. Real half-assed move by apple if you ask me. Here's a source on it https://stackoverflow.com/a/49467964. Don't bother using microphone/webcam on iOS unless you have some fallback/warning if you run it in iOS FF/iOS Chrome/social app webviews etc.
This is less of an issue with this library (which works nicely) and more of an issue with Twitter's handling of their in-app iOS browser and it's WebRTC support. However, I figured someone might be able to point me in the right direction and greatly appreciate the help. I was very excited when iOS Safari added support for WebRTC and quickly made it a part of my work. However, I noticed that in-app browsers can be hit or miss when it comes to supporting standards. Last time I checked, Twitter and Instagram's in-app browsers did not support WebRTC but Facebook's did. Anyway, it's pretty straight-forward to look at the browser user agent to detect if the user is coming from an in-app browser or Safari directly. However... Twitter's in-app browser has the same exact user agent as the standalone Safari browser... FML. In addition, WebRTC seems to fail silently on prompting and I can't figure out a way to figure out if it's working or not. An easy test is to direct message yourself the following link on Twitter and attempt to open it within the iOS app:
https://www.webrtc-experiment.com/DetectRTC
The only thought I had was to use a timer to detect if either a positive or negative WebRTC action occurred after a specified period of time. If neither occurred, I could assume that something went wrong and encourage the user to try a different browser.
Any help is much appreciated.
The text was updated successfully, but these errors were encountered: