提交 b79a7e18 authored 作者: Anthony Minessale's avatar Anthony Minessale

vid screen share placeholder --args --enable-usermedia-screen-capturing…

vid screen share placeholder --args --enable-usermedia-screen-capturing --usermedia-screen-capturing
上级 9ca115cf
......@@ -191,8 +191,8 @@
return true;
}
function onStreamError(self) {
console.log('There has been a problem retrieving the streams - did you allow access?');
function onStreamError(self, e) {
console.log('There has been a problem retrieving the streams - did you allow access?', e);
}
......@@ -332,19 +332,36 @@
onStreamSuccess(self);
}
function onError() {
onStreamError(self);
function onError(e) {
onStreamError(self, e);
}
var audio;
if (this.options.videoParams && this.options.videoParams.chromeMediaSource == 'screen') {
this.options.videoParams = {
chromeMediaSource: 'screen',
maxWidth:screen.width,
maxHeight:screen.height
};
console.error("SCREEN SHARE");
audio = false;
} else {
audio = {
mandatory: this.options.audioParams,
optional: []
};
}
console.log("Mandatory audio constraints", this.options.audioParams);
console.log("Mandatory video constraints", this.options.videoParams);
getUserMedia({
constraints: {
audio: {
mandatory: this.options.audioParams,
optional: []
},
audio: audio,
video: this.options.useVideo ? {
mandatory: this.options.videoParams,
optional: []
......@@ -395,19 +412,37 @@
onStreamSuccess(self);
}
function onError() {
onStreamError(self);
function onError(e) {
onStreamError(self, e);
}
var audio;
if (this.options.videoParams && this.options.videoParams.chromeMediaSource == 'screen') {
this.options.videoParams = {
chromeMediaSource: 'screen',
maxWidth:screen.width,
maxHeight:screen.height
};
console.error("SCREEN SHARE");
audio = false;
} else {
audio = {
mandatory: this.options.audioParams,
optional: []
};
}
console.log("Mandatory audio constraints", this.options.audioParams);
console.log("Mandatory video constraints", this.options.videoParams);
getUserMedia({
constraints: {
audio: {
mandatory: this.options.audioParams,
optional: []
},
audio: audio,
video: this.options.useVideo ? {
mandatory: this.options.videoParams,
optional: []
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论