is there any way to programmatically trick the “camera permission request” in WebRTC maybe with JavaScript ? so permission is guaranteed without asking explicitly for permission and show camera stream right away ? I want to build a web app similar to Instagram and only ask the user once the web app is saved on homescreen for camera permission, not every time he opens the app.
cheers
Sebastian
Related
I'm developing a website, in which I need to ensure that some pages won't be opened in more than one tab / browser. I need some sort of client identification. As I know MAC address cannot be queried using javascript.
I know that Netflix does something just like this, when opening two tabs of video watching, Netflix prompt an error that I'm already watching. Even if I'm using a different browser, Netflix can still tell I have another browser which is watching a video, which means they don't use cookies for this.
So in short, how can a web app distinguish between computers? How Netflix does that?
I want to create mobile-first web-app, that will track geolocation of busses. Drivers will open site and click "track me" button. Page will use geolocation.watchposition. so I wonder, if driver will shut down display, or watch another pages in the internet,
Will geolocation.watchposition work and send geolocation in db?
Yes, if the user gives the mobile phone GPS access permission the app will track the device as long as the app is open or in the background (minimized).
No it will NOT work!
See complete example at https://github.com/RichardMaher/Brotkrumen
For the complete story of why PWAs continue to be denied this essential functionality see: -
https://github.com/w3c/ServiceWorker/issues/745
I have given allow permission for Microphone in my domain. We are using our domain in multiple tabs. I am able to acquire local media (Microphone) when I am accessing in the same tab. But I am not able to acquire local media for WebRTC in the other tab(same domain) without visiting the tab .Only after visiting the tab localmedia access is acquired.
Is it intentionally done for Security & Privacy? . Is there any way to solve my problem ?
Reason: To restrict resources being used for WebRTC session. We are keeping WebRTC session in single tab for our domain and using only that resource for all the tabs to make calls.
Tried setting microphone-allow as iframe attribute . But it didnt solve the problem . It is working fine in GoogleChrome browser though. If I open a new tab(T1) and initiate webrtc in it and make webrtc call from another tab (T2)without ever visiting the tab T1 , call is connected in chrome but not in firefox unless i visit T1 .
Note : It is not asking permission for allowing microphone in the domain , it acquires it automatically . Just that it acquires only after i visit the tab .I have given microphone access permission to my domain already.
Is it intentionally done for Security & Privacy?
Yes, this is intentional to prevent background tabs from turning on the camera or mic willy nilly, to spy on users. Because that's creepy. I believe Safari works the same way.
The getUsermedia specification recently made this a requirement:
Step 6.1. "The User Agent MUST wait to proceed to the next step until the current settings object's responsible document is fully active and has focus."*
So I would expect Chrome to follow suit soon.
Is there any way to solve my problem ?
That would very much defeat the assurance.
Users can rest assured that only the currently focused tab can turn on the camera or microphone.
If I open a new tab(T1) and initiate webrtc in it and make webrtc call from another tab (T2)without ever visiting the tab T1 , call is connected in chrome but not in firefox unless i visit T1.
That's an RTCPeerConnection connection problem, which is separate from getUserMedia.
The workaround is to not block connection establishment on mic access.
There's no reason you can't connect first and add the mic later.
Or get mic ahead of time, and connect later. Basically, the two actions don't need to coincide or block each other.
Basically, I have an idea for my App, I would like the iPhone camera to keep recording a video even when the user is doing something else (like checking twitter, for example) like a spy cam. I have many coding solutions available
Is there a way I can code this with either HTML5 ,CSS, javascript or xcode?
iOS will not allow you to run the camera constantly in the background. This is because once each app enters the background state, it only has a very short time to wrap-up it's processes and prepare to be suspended (iOS does this to conserve memory).
From the apple developer docs
In iOS, only specific app types are allowed to run in the background:
Apps that play audible content to the user while in the background, such as a music player app
Apps that record audio content while in the background
Apps that keep users informed of their location at all times, such as a navigation app
Apps that support Voice over Internet Protocol (VoIP)
Apps that need to download and process new content regularly
Apps that receive regular updates from external accessories
The only other way to achieve what you want is to jailbreak your device and distribute your app on Cydia (the jailbroken App Store). Jailbreaking will free your device from the restrictions of IOS but will also make your phone a lot more vulnerable to being hacked...
I want to create an smartphone in web browsers, and I've done a good job till now. However, when I call, Google Chrome shows this message:
'http://domain' the wants to use your microphone.
See this picture:
And this is a picture of my web-based smartphone:
However, when I call, user should click Allow in the Chrome's message bar. Is there any way that I ask the browser to save microphone settings for the current user, so that each time user is not asked for permission?
You need to serve your page over https. When using https, Chrome will remember the user's choice and will not ask again.
Then if the user wants to block the microphone again, they can click on the camera icon in the URL bar.
If you go to Chrome's Settings => Advanced => Content Settings => Media section, you see that there are only two options that you can choose:
To be asked EACH TIME a page wants to access your microphone or camera
To disable media altogether
Thus there seems to be no option for that. It might sound logical, as you don't want hackers starting your camera and capturing your private life without permission. ;)