Open GoogleCodeExporter opened 9 years ago
I research this flying trouble and make hack-patch for it. Test in
Chrome-Chrome , Chrome-FF, FF-Chrome p2p call.
tmedia_session_jsep01.onGetUserMediaSuccess = function (o_stream, _This) {
tsk_utils_log_info("onGetUserMediaSuccess");
var This = (tmedia_session_jsep01.mozThis || _This);
if (This && This.o_pc && This.o_mgr) {
if(!This.b_sdp_lo_pending){
tsk_utils_log_warn("onGetUserMediaSuccess but no local sdp request is pending");
return;
}
if(This.my_mutex){tsk_utils_log_warn("onGetUserMediaSuccess already executed!"); return;}
This.my_mutex=true;
if (o_stream) {
// HACK: patch for Firefox and others
// https://groups.google.com/group/discuss-webrtc/browse_thread/thread/e30f0ffc267bce5f
if (!o_stream.videoTracks || !o_stream.audioTracks) {
var b_support_audio = !!(This.e_type.i_id & tmedia_type_e.AUDIO.i_id);
var b_support_video = !!(This.e_type.i_id & tmedia_type_e.VIDEO.i_id);
o_stream.audioTracks = o_stream.getAudioTracks ? o_stream.getAudioTracks() : { length: b_support_audio ? 1 : 0 };
o_stream.videoTracks = o_stream.getVideoTracks ? o_stream.getVideoTracks() : { length: b_support_video ? 1 : 0 };
}
// save stream other next calls
if (o_stream.audioTracks.length > 0 && o_stream.videoTracks.length == 0) {
__o_jsep_stream_audio = o_stream;
}
else if (o_stream.audioTracks.length > 0 && o_stream.videoTracks.length > 0) {
__o_jsep_stream_audiovideo = o_stream;
}
if (!This.o_local_stream) {
This.o_mgr.callback(tmedia_session_events_e.STREAM_LOCAL_ACCEPTED, this.e_type);
}
// HACK: Firefox only allows to call gum one time
if (tmedia_session_jsep01.mozThis) {
__o_jsep_stream_audiovideo = __o_jsep_stream_audio = o_stream;
}
This.o_local_stream = o_stream;
This.o_pc.addStream(o_stream);
}
else {
// Probably call held
}
This.o_mgr.set_stream_local(o_stream);
var b_answer = ((This.b_sdp_ro_pending || This.b_sdp_ro_offer) && (This.o_sdp_ro != null));
if (b_answer) {
tsk_utils_log_info("createAnswer");
This.o_pc.createAnswer(
tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onCreateSdpSuccess : function(o_offer){ tmedia_session_jsep01.onCreateSdpSuccess(o_offer, This); },
tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onCreateSdpError : function(s_error){ tmedia_session_jsep01.onCreateSdpError(s_error, This); },
This.o_media_constraints,
false // createProvisionalAnswer
);
}
else {
tsk_utils_log_info("createOffer");
This.o_pc.createOffer(
tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onCreateSdpSuccess : function(o_offer){ tmedia_session_jsep01.onCreateSdpSuccess(o_offer, This); },
tmedia_session_jsep01.mozThis ? tmedia_session_jsep01.onCreateSdpError : function(s_error){ tmedia_session_jsep01.onCreateSdpError(s_error, This); },
This.o_media_constraints
);
}
}
}
Original comment by mkin...@gmail.com
on 18 Feb 2015 at 1:48
@mkin...@gmail.com
Wow, guy, that's just the solution I were looking for, and just the time it was
about to hit the fan!
Problem with sipml5 + chrome 40-41 + asterisk 11.15-11.16.
I'd gladly buy a chicken and sacrifice it for deity of your choice.
Original comment by G.A.Dasz...@gmail.com
on 19 Feb 2015 at 11:05
What do you think will be this patch-update in the next official release?
We rolled back to the stable version 1.4.217. But most likely we need the
additional support for the FF browser. Looking forward to the FF-36 release, 35
doesn't work for us.
In any case, thank you for support and answers in this post!
Original comment by AP.Rol...@gmail.com
on 19 Feb 2015 at 11:37
Original issue reported on code.google.com by
AP.Rol...@gmail.com
on 9 Feb 2015 at 11:09Attachments: