mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 16:58:35 +00:00
FS-8003 #resolve Use audioInDevices instead of audioDevices to match verto plugin.
FS-8003 Also make modifications so that refreshing device actually calls APIs on the verto library instead of just reparsing it's output.
This commit is contained in:
parent
aa0bbe84af
commit
c0a5c54bc1
@ -234,8 +234,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location',
|
|||||||
|
|
||||||
refreshDevices: function(callback) {
|
refreshDevices: function(callback) {
|
||||||
console.debug('Attempting to refresh the devices.');
|
console.debug('Attempting to refresh the devices.');
|
||||||
|
function refreshDevicesCallback() {
|
||||||
|
|
||||||
data.videoDevices = [{
|
data.videoDevices = [{
|
||||||
id: 'none',
|
id: 'none',
|
||||||
label: 'No camera'
|
label: 'No camera'
|
||||||
@ -283,8 +282,8 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location',
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i in jQuery.verto.audioDevices) {
|
for (var i in jQuery.verto.audioInDevices) {
|
||||||
var device = jQuery.verto.audioDevices[i];
|
var device = jQuery.verto.audioInDevices[i];
|
||||||
// Selecting the first source.
|
// Selecting the first source.
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
data.selectedAudio = device.id;
|
data.selectedAudio = device.id;
|
||||||
@ -302,17 +301,11 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location',
|
|||||||
label: device.label || device.id
|
label: device.label || device.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.debug('Devices were refreshed.');
|
console.debug('Devices were refreshed.');
|
||||||
|
|
||||||
if (angular.isFunction(callback)) {
|
|
||||||
var devices = {
|
|
||||||
audio: data.audioDevices,
|
|
||||||
video: data.videoDevices,
|
|
||||||
share: data.shareDevices
|
|
||||||
};
|
};
|
||||||
callback(data.instance, devices);
|
|
||||||
}
|
jQuery.verto.refreshDevices(refreshDevicesCallback);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user