Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 11: Webrtc video stream does not working in PWA (Progressive Web App) #933

Closed
ruslan-mystore opened this issue Oct 10, 2017 · 25 comments

Comments

@ruslan-mystore
Copy link

Webrtc video stream does not working in PWA (Progressive Web App) as standalone APP on iOS.
Tested devices: iphone7, iphone 6, ipad pro 2017

When you accessing to the Web Page via Safari 11 it's working fine, but not as pwa standalone app

@KaptenJansson
Copy link
Contributor

Not sure how PWA works on iOS. Is it safari that packages it?

@Lucassifoni
Copy link

Lucassifoni commented Oct 12, 2017

Hey,

When you have a apple-mobile-web-app-capable meta tag, both getUserMedia and photo upload with an <input type="file"> tag stop working. iOS 11 supposedly brought WebRTC, but broke the main previous way to upload pictures (the input tag) and didn't bring getUserMedia in a PWA context.

For now, the only "solution" is to remove the meta tag and access the page from Safari, not the homescreen.

Edit : see https://stackoverflow.com/questions/46228218/how-to-access-camera-on-ios11-home-screen-web-app/46350136

😕

To be honest, I'm quite angry. They even broke file inputs in PWAs. No communication whatsoever, only spare threads showing this problem on stackoverflow/github.

@Pablo-Aldana
Copy link

Any chance to have this issue / feature solve/done? In my company we are doing a PWA face recognition and unfortunately we cannot use it as PWA in iOS because of this issue.

@Lucassifoni
Copy link

Sadly, for internal apps, we're looking to buy Android devices as a workaround. The lack of communication is deceiving.

@KaptenJansson
Copy link
Contributor

Please file a bug to the people packaging PWA apps, we do not in this repo have anything to do with that.

@ruslan-mystore
Copy link
Author

@Lucassifoni
According to your link in stackoverflow , seems like this feature should work on iOS 11.3.
I updated my devices to iOS 11.3 and webrtc camera not working .
May be i miss something ?

@Lucassifoni
Copy link

Lucassifoni commented Apr 2, 2018

@ruslan-mystore well it's fixed, ensure you give video tags a playsinline attribute, and that you run your code on either localhost or a secured domain :) .
You can test webrtc features here : https://test.webrtc.org/
Edit : oh, well, i'm unsure for the PWA context part. StackOverflow indicates getUserMedia is still undefined in this context, but file input media capture has been restored. I won't be able to test this since I downgraded all my PWAs to standard pages while I'm waiting for Apple.

@PrItHvI7
Copy link

PrItHvI7 commented Aug 27, 2018

Does Progressive Web Apps on iOS support “getUserMedia/Stream API” ? i am developing an application using Quagga barcode scanner, where it works fine on ios safari browser but while accessing through its webApp, it crashes with error below. [Error] ERROR — Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating ‘k.inputStream.type’)

@Lucassifoni
Copy link

Lucassifoni commented Aug 27, 2018

@PrltHvl7 you won't be able to access the Media API through an "installed" PWA on iOS at the time sadly. Use a standard <input type="file"> with instructions as a fallback, or force users to access the webpage in safari.

@odahcam
Copy link

odahcam commented Sep 5, 2018

That's annoying. Is there any decent reason why @apple is doing this shit?

@derappelt
Copy link

derappelt commented Oct 7, 2019

That's annoying. Is there any decent reason why @apple is doing this shit?

Because they don't want web apps to replace app store apps. If a web app is capable of everything an installed app is, no one will ever use the app store again. It's embarrassing and childish but that's @apple .

@odahcam
Copy link

odahcam commented Oct 7, 2019

That's sad, they say that webkit has a security bug with the cameras. If they could get this to work, I wouldn't mind if they monetize the PWAs or make the developers pay to offer it. It's just too odd that Apple (the giant Apple) can't solve that.

@Lucassifoni
Copy link

Well, I see with your notifications my first comment in this thread will be two years old next week. The project I needed this for has been canceled, others have been started and finished, some are ongoing, and we haven't released a PWA since because of our Apple-centric userbase... That's for sure one way of handling standards.

@Ferigit
Copy link

Ferigit commented Jan 5, 2020

for react pwa, it works on browser mode on ios , but it does not work on home screen mode. Does any body could solve this propbelm?

@mordka
Copy link

mordka commented Jan 7, 2020

Obviously Apple is not going to change, so we implemented a popup to notify users that safari is not a recommended browser informing about better browsers following web standards. This reminds me famous popup on Youtube about Internet Explorer, soon after that many big websites repeated this and soon Internet Explorer died. I hope the same will happen with Safari (and iOS).

@odahcam
Copy link

odahcam commented Jan 8, 2020

The problem is not Safari, but @apple's WebKit that does not make it possible to expose WebRTC device access in standalone apps. There's a security bug that blocks that and the WebKit team seems to be facing some trouble to fix it. That's why there's no WebRTC in iOS running PWAs.

@a-m-dev
Copy link

a-m-dev commented Jan 20, 2020

its so damn confusing, yesterday i tested camera on my iphone 8 in a pwa app -> does NOT worked,
today i checked it , it works....

@odahcam
Copy link

odahcam commented Jan 20, 2020

@a-m-dev you sure?

@jogibear9988
Copy link

@a-m-dev
youre sure you installed the pwa to homescreen?

@lacchain-stamping
Copy link

You are using webRTC or the <input type = "file" ...>?

@jogibear9988
Copy link

for me it‘s not workin...

@jogibear9988
Copy link

issue i created at safari is still open after 3 years

@AnotherStar
Copy link

@apple, come on!

1 similar comment
@gmpassos
Copy link

@apple, come on!

@ScottAgirs
Copy link

@apple, come on!

@apple, come on! +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests