【发布时间】:2016-12-02 12:46:07
【问题描述】:
我的科尔多瓦应用中有类似的东西
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.location.href = 'https://mobile.xxx.com';
}
现在我需要在这个网站上使用 webRTC。当我在移动浏览器(chrome 54.0.2840.85)中运行它时工作正常。
但是,当我使用 apk 时,webview 不会加载 webRTC 功能,如相机或微型。
因此,在移动浏览器中它可以正常工作,在 webview 中 rtc 将无法正常工作。
这就是我在 config.xml 中的内容
<content src="index.html" />
<access origin="https://mobile.xxx.com" />
<allow-navigation href="https://mobile.xxx.com" />
<allow-intent href="https://mobile.xxx.com" />
<plugin name="cordova-plugin-network-information" version="1.3.0" source="npm" />
<plugin name="cordova-plugin-splashscreen" version="4.0.0" source="npm" />
<plugin name="cordova-plugin-whitelist" version="1.3.0" source="npm" />
<plugin name="cordova-plugin-dialogs" version="1.3.0" source="npm" />
<plugin name="cordova-plugin-statusbar" version="2.2.0" source="npm" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="phonegap-version" value="cli-6.3.0" />
<preference name="permissions" value="none"/>
<preference name="target-device" value="universal"/>
<preference name="fullscreen" value="true"/>
<preference name="show-splash-screen-spinner" value="true" />
<preference name="stay-in-webview" value="true" />
<preference name="orientation" value="portrait" />
<preference name="loadUrlTimeoutValue" value="700000" />
已经尝试过crosswalk,但同样的问题。如何在科尔多瓦 webview 中拥有 webrtc? 澄清一下,我只是在寻找一个功能演示。
【问题讨论】:
-
你用的是什么版本的人行横道?
-
@johnborges 已经尝试过使用
<plugin name="cordova-plugin-crosswalk-webview" />和<plugin name="cordova-plugin-crosswalk-webview-pgb-adapt" source="npm" version="1.4.0-dev-5"/>
标签: android cordova webview phonegap-plugins phonegap-build