我正在使用https://simplewebrtc.com/作为webrtc,在Firefox中一切都很好,但是当我尝试使用chrome时,它不起作用是我的代码:-
var webrtc = new SimpleWebRTC({
localVideoEl: 'local-videos-container',
remoteVideosEl: 'videos-container',
autoRequestMedia: false,
url: '//192.168.1.51:8001'
});
$(document).on('click', '#share-screen', function () {
webrtc.shareScreen(function (e, d) {
if (e) {
alert(e); // throwing NavigatorUserMediaError
}
});
});我也添加了铬分机,这是分机代码:-
{
"name": "Screensharing Sample",
"description": "Screensharing utility sample for getscreenmedia",
"version": "0.0.1",
"manifest_version": 2,
"minimum_chrome_version": "34",
"icons": {
},
"permissions": [
"desktopCapture"
],
"background": {
"scripts": ["background.js"]
},
"content_scripts": [ {
"js": [ "content.js" ],
"matches": ["https://192.168.1.51:2013/*"]
}],
"externally_connectable": {
"matches": [
"https://192.168.1.51:2013/*"
]
}
}我做错了什么。请帮我谢谢
发布于 2015-10-20 09:31:41
似乎您没有添加匹配域correctly.try来用以下代码替换匹配:
将"matches": ["https://192.168.1.51:2013/*"]替换为"matches": ["https://192.168.1.51:*/*"]
如果成功的话请告诉我。
https://stackoverflow.com/questions/33232648
复制相似问题