未能执行';后消息';在';DOMWindow';Android上的消息

未能执行';后消息';在';DOMWindow';Android上的消息,android,youtube,youtube-api,video.js,Android,Youtube,Youtube Api,Video.js,我们正在使用 加载视频时,控制台显示错误 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://www.youtube.com'). 我按照建议的解决方案添加了forceSSL:true,它解决了桌面的问题,但我仍然在安卓设备上使用它 v

我们正在使用

加载视频时,控制台显示错误

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://www.youtube.com').
我按照建议的解决方案添加了forceSSL:true,它解决了桌面的问题,但我仍然在安卓设备上使用它

videoJS实例创建:

scope.player = videojs('vid3', { techOrder: ["youtube"], controls: true, preload: "auto", autoplay: false, 'forceSSL':true, 'forceHTML5':true, src: attributes.src})

我假设您正在网络视图中加载页面。你用哪种方法? 我建议您使用传递为baseUrl的方法

如文件中所述:

loadDataWithBaseURL使用baseUrl作为基本URL,将给定数据加载到此WebView中 对于内容。基本URL用于解析相对URL 当应用JavaScript的同源策略时


有更新吗?我提交了一个bug。。。