Last active
August 29, 2015 14:02
-
-
Save steve-ng/14b9b88af43f92db1e46 to your computer and use it in GitHub Desktop.
SIPML5 fix for Chrome v35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Chrome 35 forced dtls fix | |
*/ | |
var tmedia_session_jsep01$prev = tmedia_session_jsep01; | |
tmedia_session_jsep01 = function tmedia_session_jsep01(o_mgr) { | |
tmedia_session_jsep.call(this, o_mgr); | |
this.o_media_constraints = | |
{ 'mandatory': | |
{ | |
'OfferToReceiveAudio': !!(this.e_type.i_id & tmedia_type_e.AUDIO.i_id), | |
'OfferToReceiveVideo': !!(this.e_type.i_id & tmedia_type_e.VIDEO.i_id) | |
}, | |
'optional': [{ | |
DtlsSrtpKeyAgreement: false | |
}] | |
}; | |
if(tsk_utils_get_navigator_friendly_name() == 'firefox'){ | |
tmedia_session_jsep01.mozThis = this; | |
this.o_media_constraints.mandatory.MozDontOfferDataChannel = true; | |
} | |
}; | |
for(var key in tmedia_session_jsep01$prev){ | |
if(tmedia_session_jsep01$prev.hasOwnProperty(key)){ | |
tmedia_session_jsep01[key] = tmedia_session_jsep01$prev[key]; | |
} | |
} | |
tmedia_session_jsep01.prototype = tmedia_session_jsep01$prev.prototype; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment