mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
eb70f05168
This patch overrides onPermissionRequest so that getUserMedia can be used inside the browser. Since a hybrid app has to request permissions anyways via AndroidManifest.xml, I think it is unnecessary to have any further configuration for onPermissionRequest. Anything that the app is allowed to do should be possible from the JS side. Hence all requests are granted. This enables getUserMedia (and WebRTC) on Android Lollipop, without resorting to crosswalk. The docs say that request.grant has to be called from the UI thread, but don't explicitly spell out whether onPermissionRequest is called from the UI thread. I think that this is so, the WebChromeClient of course makes its calls from the UI thread unless otherwise noted. So there is no need to post a runnable to the UI thread. This closes 178 https://github.com/apache/cordova-android/pull/178 |
||
---|---|---|
.. | ||
.settings | ||
src/org/apache/cordova | ||
.classpath | ||
.project | ||
AndroidManifest.xml | ||
ant.properties | ||
build.gradle | ||
build.xml | ||
cordova.gradle | ||
default.properties | ||
project.properties |