Comments (4)
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 [email protected]
on 18 Feb 2015 at 1:48
from sipml5.
@[email protected]
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 [email protected]
on 19 Feb 2015 at 11:05
from sipml5.
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 [email protected]
on 19 Feb 2015 at 11:37
from sipml5.
Original comment by [email protected]
on 18 Mar 2015 at 9:03
- Changed state: Accepted
from sipml5.
Related Issues (20)
- SIP INFO DTMF not compatible with Asterisk HOT 1
- enable_media_stream_cache setting does not work HOT 2
- dtmf formatted incorrectly HOT 3
- Too large SIP INVITE
- tsip_transac_layer.prototype.cancel_by_dialog incorrectly deletes transactions when there is more than one transaction HOT 2
- SUBSCRIBE does not contain route headers
- Sipml5 not connecting HOT 1
- No Audio on Firefox 34+
- dtmf('#') and dtmf('*') are not detected correctly
- Called in wrong state: STATE_INPROGRESS HOT 6
- startBfcpShare not working
- Content length for SIP INFO packets is incorrect in latest release HOT 1
- Firefox ICE resolution to incorrect 0.0.0.0 address HOT 2
- Video stream doesnt add in SipML5
- Export to GitHub
- Available on main package managers
- sipml5 unable to play remote audio HOT 2
- No early audio in outgoing sipml call to an extension. HOT 2
- Parameters send to Event Listener Function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sipml5.