Merge pull request #645 in FS/freeswitch from ~JAONZE/freeswitch:bugfix/FS-8563-output-device-mechanism-needs-feedback to master

* commit 'ef3e43840614e3e62238c1e48fbfad6344ff0b2f':
  FS-8563 [verto_communicator] - Added callback to setAudioPlaybackDevice
This commit is contained in:
Ítalo Rossi committed 2015-12-22 12:10:15 -06:00
commit 2765893b27
4 files changed
+24 -6

No files matched your search

@@ -54,10 +54,9 @@
});
$rootScope.$on('changedSpeaker', function(event, speakerId) {
// This should provide feedback
//setAudioPlaybackDevice(<id>[,<callback>[,<callback arg>]]);
// if callback is set it will be called as callback(<bool success/fail>, <device name>, <arg if you supplied it>)
verto.data.call.setAudioPlaybackDevice(speakerId);
if (verto.data.call) {
verto.data.call.setAudioPlaybackDevice(speakerId, sinkIdCallback);
}
});
/**
@@ -528,6 +527,13 @@
});
};
function sinkIdCallback(success, deviceName) {
if (success) {
toastr.info('Speaker is now <span class="install">' + deviceName + '</a>', 'Success', { allowHtml: true });
} else {
toastr.error('Your browser doesn\'t seem to support this feature', 'Error');
}
}
}
);