vid screen share placeholder --args --enable-usermedia-screen-capturing --usermedia-screen-capturing
This commit is contained in:
parent
9ca115cf05
commit
b79a7e1851
|
@ -191,8 +191,8 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamError(self) {
|
function onStreamError(self, e) {
|
||||||
console.log('There has been a problem retrieving the streams - did you allow access?');
|
console.log('There has been a problem retrieving the streams - did you allow access?', e);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,19 +332,36 @@
|
||||||
onStreamSuccess(self);
|
onStreamSuccess(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onError() {
|
function onError(e) {
|
||||||
onStreamError(self);
|
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 audio constraints", this.options.audioParams);
|
||||||
console.log("Mandatory video constraints", this.options.videoParams);
|
console.log("Mandatory video constraints", this.options.videoParams);
|
||||||
|
|
||||||
getUserMedia({
|
getUserMedia({
|
||||||
constraints: {
|
constraints: {
|
||||||
audio: {
|
audio: audio,
|
||||||
mandatory: this.options.audioParams,
|
|
||||||
optional: []
|
|
||||||
},
|
|
||||||
video: this.options.useVideo ? {
|
video: this.options.useVideo ? {
|
||||||
mandatory: this.options.videoParams,
|
mandatory: this.options.videoParams,
|
||||||
optional: []
|
optional: []
|
||||||
|
@ -395,19 +412,37 @@
|
||||||
onStreamSuccess(self);
|
onStreamSuccess(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onError() {
|
function onError(e) {
|
||||||
onStreamError(self);
|
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 audio constraints", this.options.audioParams);
|
||||||
console.log("Mandatory video constraints", this.options.videoParams);
|
console.log("Mandatory video constraints", this.options.videoParams);
|
||||||
|
|
||||||
|
|
||||||
getUserMedia({
|
getUserMedia({
|
||||||
constraints: {
|
constraints: {
|
||||||
audio: {
|
audio: audio,
|
||||||
mandatory: this.options.audioParams,
|
|
||||||
optional: []
|
|
||||||
},
|
|
||||||
video: this.options.useVideo ? {
|
video: this.options.useVideo ? {
|
||||||
mandatory: this.options.videoParams,
|
mandatory: this.options.videoParams,
|
||||||
optional: []
|
optional: []
|
||||||
|
|
Loading…
Reference in New Issue