提交 58b163e0 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-10360: [freeswitch-core,verto.js] FireFox Screen Sharing #resolve

上级 d99efb69
......@@ -479,15 +479,12 @@
if (obj.options.audioParams) {
audio = obj.options.audioParams;
}
}
if (obj.options.useMic !== "any") {
//audio.optional = [{sourceId: obj.options.useMic}]
audio.deviceId = {exact: obj.options.useMic};
}
}
if (obj.options.useVideo && obj.options.localVideo) {
......@@ -510,18 +507,28 @@
if (obj.options.screenShare) {
// fix for chrome to work for now, will need to change once we figure out how to do this in a non-mandatory style constraint.
var opt = [];
opt.push({sourceId: obj.options.useCamera});
if (!!navigator.mozGetUserMedia) {
var dowin = window.confirm("Do you want to share an application window? If not you will share a screen.");
if (bestFrameRate) {
opt.push({minFrameRate: bestFrameRate});
opt.push({maxFrameRate: bestFrameRate});
video = {
width: {min: obj.options.videoParams.minWidth, max: obj.options.videoParams.maxWidth},
height: {min: obj.options.videoParams.minHeight, max: obj.options.videoParams.maxHeight},
mediaSource: dowin ? "window" : "screen"
}
} else {
var opt = [];
opt.push({sourceId: obj.options.useCamera});
if (bestFrameRate) {
opt.push({minFrameRate: bestFrameRate});
opt.push({maxFrameRate: bestFrameRate});
}
video = {
mandatory: obj.options.videoParams,
optional: opt
};
}
video = {
mandatory: obj.options.videoParams,
optional: opt
};
} else {
video = {
......@@ -603,7 +610,7 @@
},
constraints: self.constraints,
iceServers: self.options.iceServers,
});
});     
onStreamSuccess(self, stream);
}
......@@ -622,7 +629,7 @@
getUserMedia({
constraints: {
audio: mediaParams.audio,
video: mediaParams.video
video: mediaParams.video
},
video: mediaParams.useVideo,
onsuccess: onSuccess,
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
......@@ -934,7 +934,7 @@ function doshare(on) {
console.log("Attempting Screen Capture....");
getScreenId(function (error, sourceId, screen_constraints) {
var sharefunc = function(error, sourceId, screen_constraints) {
......@@ -944,15 +944,22 @@ function doshare(on) {
caller_id_number: $("#cid").val() + " (screen)",
outgoingBandwidth: outgoingBandwidth,
incomingBandwidth: incomingBandwidth,
videoParams: screen_constraints.video.mandatory,
videoParams: screen_constraints ? screen_constraints.video.mandatory : {},
useVideo: true,
screenShare: true,
dedEnc: $("#use_dedenc").is(':checked'),
mirrorInput: $("#mirror_input").is(':checked')
});
});
};
if (!!navigator.mozGetUserMedia) {
sharefunc();
} else {
getScreenId(sharefunc);
}
//$("#main_info").html("Trying");
......
......@@ -2381,6 +2381,10 @@ SWITCH_STANDARD_APP(conference_function)
if (switch_channel_test_flag(channel, CF_VIDEO_ONLY) || !switch_channel_test_flag(channel, CF_AUDIO)) {
while(conference_utils_member_test_flag((&member), MFLAG_RUNNING) && switch_channel_ready(channel)) {
switch_frame_t *read_frame;
if (switch_channel_test_flag(channel, CF_AUDIO)) {
switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
}
switch_yield(100000);
}
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论