FS-7509: nm, this instead
This commit is contained in:
parent
f48289ca2c
commit
e701f7ec9d
|
@ -240,6 +240,5 @@ if(dialog.state.val>=$.verto.enum.state.early.val){dialog.setState($.verto.enum.
|
|||
if(params.display_number){dialog.params.remote_caller_id_number=params.display_number;}
|
||||
dialog.sendMessage($.verto.enum.message.display,{});};$.verto.dialog.prototype.handleMedia=function(params){var dialog=this;if(dialog.state.val>=$.verto.enum.state.early.val){return;}
|
||||
dialog.gotEarly=true;dialog.rtc.answer(params.sdp,function(){console.log("Dialog "+dialog.callID+"Establishing early media");dialog.setState($.verto.enum.state.early);if(dialog.gotAnswer){console.log("Dialog "+dialog.callID+"Answering Channel");dialog.setState($.verto.enum.state.active);}},function(e){console.error(e);dialog.hangup();});console.log("Dialog "+dialog.callID+"EARLY SDP",params.sdp);};$.verto.ENUM=function(s){var i=0,o={};s.split(" ").map(function(x){o[x]={name:x,val:i++};});return Object.freeze(o);};$.verto.enum={};$.verto.enum.states=Object.freeze({new:{requesting:1,recovering:1,ringing:1,destroy:1,answering:1,hangup:1},requesting:{trying:1,hangup:1},recovering:{answering:1,hangup:1},trying:{active:1,early:1,hangup:1},ringing:{answering:1,hangup:1},answering:{active:1,hangup:1},active:{answering:1,requesting:1,hangup:1,held:1},held:{hangup:1,active:1},early:{hangup:1,active:1},hangup:{destroy:1},destroy:{},purge:{destroy:1}});$.verto.enum.state=$.verto.ENUM("new requesting trying recovering ringing answering early active held hangup destroy purge");$.verto.enum.direction=$.verto.ENUM("inbound outbound");$.verto.enum.message=$.verto.ENUM("display info pvtEvent");$.verto.enum=Object.freeze($.verto.enum);$.verto.saved=[];$(window).bind('beforeunload',function(){for(var i in $.verto.saved){var verto=$.verto.saved[i];if(verto){verto.purge();verto.logout();}}
|
||||
return $.verto.warnOnUnload;});$.verto.videoDevices=[];$.verto.audioDevices=[];$.verto.findDevices=function(runtime){var aud=[],vid=[];$.FSRTC.getValidRes(null,function(){console.info("enumerating devices");MediaStreamTrack.getSources(function(media_sources){for(var i=0;i<media_sources.length;i++){if(media_sources[i].kind=='video'){vid.push(media_sources[i]);}else{aud.push(media_sources[i]);}}
|
||||
$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();});});}
|
||||
$.verto.init=function(runtime){$.verto.findDevices(runtime);};})(jQuery);
|
||||
return $.verto.warnOnUnload;});$.verto.videoDevices=[];$.verto.audioDevices=[];$.verto.init=function(obj,runtime){var aud=[],vid=[];$.FSRTC.getValidRes(obj.camera,function(){console.info("enumerating devices");MediaStreamTrack.getSources(function(media_sources){for(var i=0;i<media_sources.length;i++){if(media_sources[i].kind=='video'){vid.push(media_sources[i]);}else{aud.push(media_sources[i]);}}
|
||||
$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();});});}})(jQuery);
|
|
@ -2144,10 +2144,10 @@
|
|||
$.verto.videoDevices = [];
|
||||
$.verto.audioDevices = [];
|
||||
|
||||
$.verto.findDevices = function(runtime) {
|
||||
$.verto.init = function(obj, runtime) {
|
||||
var aud = [], vid = [];
|
||||
|
||||
$.FSRTC.getValidRes(null, function() {
|
||||
$.FSRTC.getValidRes(obj.camera, function() {
|
||||
console.info("enumerating devices");
|
||||
|
||||
MediaStreamTrack.getSources(function (media_sources) {
|
||||
|
@ -2170,9 +2170,4 @@
|
|||
});
|
||||
}
|
||||
|
||||
$.verto.init = function(runtime) {
|
||||
$.verto.findDevices(runtime);
|
||||
};
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
@ -240,6 +240,5 @@ if(dialog.state.val>=$.verto.enum.state.early.val){dialog.setState($.verto.enum.
|
|||
if(params.display_number){dialog.params.remote_caller_id_number=params.display_number;}
|
||||
dialog.sendMessage($.verto.enum.message.display,{});};$.verto.dialog.prototype.handleMedia=function(params){var dialog=this;if(dialog.state.val>=$.verto.enum.state.early.val){return;}
|
||||
dialog.gotEarly=true;dialog.rtc.answer(params.sdp,function(){console.log("Dialog "+dialog.callID+"Establishing early media");dialog.setState($.verto.enum.state.early);if(dialog.gotAnswer){console.log("Dialog "+dialog.callID+"Answering Channel");dialog.setState($.verto.enum.state.active);}},function(e){console.error(e);dialog.hangup();});console.log("Dialog "+dialog.callID+"EARLY SDP",params.sdp);};$.verto.ENUM=function(s){var i=0,o={};s.split(" ").map(function(x){o[x]={name:x,val:i++};});return Object.freeze(o);};$.verto.enum={};$.verto.enum.states=Object.freeze({new:{requesting:1,recovering:1,ringing:1,destroy:1,answering:1,hangup:1},requesting:{trying:1,hangup:1},recovering:{answering:1,hangup:1},trying:{active:1,early:1,hangup:1},ringing:{answering:1,hangup:1},answering:{active:1,hangup:1},active:{answering:1,requesting:1,hangup:1,held:1},held:{hangup:1,active:1},early:{hangup:1,active:1},hangup:{destroy:1},destroy:{},purge:{destroy:1}});$.verto.enum.state=$.verto.ENUM("new requesting trying recovering ringing answering early active held hangup destroy purge");$.verto.enum.direction=$.verto.ENUM("inbound outbound");$.verto.enum.message=$.verto.ENUM("display info pvtEvent");$.verto.enum=Object.freeze($.verto.enum);$.verto.saved=[];$(window).bind('beforeunload',function(){for(var i in $.verto.saved){var verto=$.verto.saved[i];if(verto){verto.purge();verto.logout();}}
|
||||
return $.verto.warnOnUnload;});$.verto.videoDevices=[];$.verto.audioDevices=[];$.verto.findDevices=function(runtime){var aud=[],vid=[];$.FSRTC.getValidRes(null,function(){console.info("enumerating devices");MediaStreamTrack.getSources(function(media_sources){for(var i=0;i<media_sources.length;i++){if(media_sources[i].kind=='video'){vid.push(media_sources[i]);}else{aud.push(media_sources[i]);}}
|
||||
$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();});});}
|
||||
$.verto.init=function(runtime){$.verto.findDevices(runtime);};})(jQuery);
|
||||
return $.verto.warnOnUnload;});$.verto.videoDevices=[];$.verto.audioDevices=[];$.verto.init=function(obj,runtime){var aud=[],vid=[];$.FSRTC.getValidRes(obj.camera,function(){console.info("enumerating devices");MediaStreamTrack.getSources(function(media_sources){for(var i=0;i<media_sources.length;i++){if(media_sources[i].kind=='video'){vid.push(media_sources[i]);}else{aud.push(media_sources[i]);}}
|
||||
$.verto.videoDevices=vid;$.verto.audioDevices=aud;console.info("Audio Devices",$.verto.audioDevices);console.info("Video Devices",$.verto.videoDevices);runtime();});});}})(jQuery);
|
|
@ -751,7 +751,7 @@ function refresh_devices()
|
|||
$("#usemic").empty();
|
||||
|
||||
|
||||
$.verto.findDevices(function() {
|
||||
$.verto.init({camera: null}, function() {
|
||||
var x = 0;
|
||||
|
||||
$("#usecamera").append(new Option("No Camera", "none"));
|
||||
|
@ -1273,7 +1273,7 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
|
||||
$.verto.init(init);
|
||||
init();
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue