【问题标题】:cordova-plugin-crosswalk-webview and I'm getting navigator.getUserMedia is not a functioncordova-plugin-crosswalk-webview 我得到 navigator.getUserMedia 不是一个函数
【发布时间】:2017-08-09 17:15:49
【问题描述】:

我正在使用 cordova-plugin-crosswalk-webview 开发一个 ionic WebRTC 应用程序,我得到 navigator.getUserMedia is not a function when running on the android device 你知道为什么吗?

    navigator.getUserMedia({audio: true, video: true},
        function(stream){
            let vid = document.getElementById('my-video');

            if(vid)
            {
                vid.setAttribute("src", URL.createObjectURL(stream));
            } else {
                alert("err geting div");
            }
            //this.localStream = stream;
          
        }, function(){ alert("err");}
    );
    <video id="my-video" muted="true" autoplay="" src=""></video>

【问题讨论】:

    标签: ionic-framework webrtc getusermedia crosswalk


    【解决方案1】:

    我通过重新安装 cordova-plugin-crosswalk-webview 插件解决了我的问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-27
      • 1970-01-01
      • 1970-01-01
      • 2018-02-12
      • 1970-01-01
      • 1970-01-01
      • 2020-06-25
      相关资源
      最近更新 更多