Bug 180551 - getUserMedia fails with HOME SCREEN mode on iOS, navigator.mediaDevices are undefined
Summary: getUserMedia fails with HOME SCREEN mode on iOS, navigator.mediaDevices are u...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 11
Hardware: iPhone / iPad iOS 12
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-07 15:34 PST by MH
Modified: 2019-06-27 03:54 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MH 2017-12-07 15:34:58 PST
+++ This bug was initially created as a clone of Bug #176349 +++

There is test pen
https://codepen.io/hejral/pen/eeaKrx?editors=1011

getUserMedia does NOT exist in iOS HOME SCREEN mode web app defined with
<meta name="apple-mobile-web-app-capable" content="yes" />

VIDEO-CAMERA DO NOT WORKS! we get error message:
navigator.mediaDevices UNDEFINED!

This bug is really huge problem, because we are building modern web-app which depends on video-camera-scanning... (additional processing with canvas). And we are not alone...

Many thanks for help, in advance!
Comment 1 MH 2017-12-07 15:45:49 PST
Additional info:

apple-mobile-web-app-capable
Sets whether a web application runs in full-screen mode.

Syntax
<meta name="apple-mobile-web-app-capable" content="yes">

Discussion
If content is set to yes, the web application runs in full-screen mode; otherwise, it does not. The default behavior is to use Safari to display web content.

You can determine whether a webpage is displayed in full-screen mode using the window.navigator.standalone read-only Boolean JavaScript property.

https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW3
Comment 2 gabrielstuff 2018-10-11 03:35:18 PDT
Hello,
I confirm that this still is the case on iOS 11+. Newly iOS 12 got the same issue.
Test case here: https://gigantic-sword.glitch.me/

This is clearly a big issue. Will be glad to help.
Comment 3 MH 2018-12-10 01:53:55 PST
(In reply to gabrielstuff from comment #2)
> Hello,
> I confirm that this still is the case on iOS 11+. Newly iOS 12 got the same issue.
> 
> This is clearly a big issue. Will be glad to help.

YES!

Yes, still blocked on iOS12.1 in home-screen mode.

It's a shame that this ability is still blocked and disabled for a REAL web app on iOS... I do not understand why...

Apple is definitely disadvantaging iOS versus competitors...
Comment 4 MH 2018-12-10 02:11:38 PST
(In reply to gabrielstuff from comment #2)

> This is clearly a big issue. Will be glad to help.

...the bug was directly reported to Apple repeatedly - the answer to my report was: DUPLICATE OF BUG xyz :))

https://bugreport.apple.com/web/?problemID=42564558

Please try to urge Apple directly too... it will definitely help if we get louder.

I do not know... but maybe there is another way when our bugreports are ignored?
Comment 5 Adam Szmyd 2019-01-28 02:03:07 PST
The same issue (navigator.mediaDevices = undefined) is when using i.e. SFSafariViewController and having "in app" Safari experience. you can easily check that by opening link from Google Calendar app. It'll also give you navgiator.mediaDevices as undefined which breaks a lot of user-media related web pages.