GUACAMOLE-237: Update JSDoc comments for new code.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/f0a658bb Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/f0a658bb Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/f0a658bb Branch: refs/heads/master Commit: f0a658bb975ea0f0abc6bbcc692212bf08434606 Parents: 4c53f28 Author: Nick Couchman <[email protected]> Authored: Wed Jan 3 12:19:48 2018 -0500 Committer: Nick Couchman <[email protected]> Committed: Wed Jan 3 12:19:48 2018 -0500 ---------------------------------------------------------------------- .../src/main/webapp/modules/AudioRecorder.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/f0a658bb/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js ---------------------------------------------------------------------- diff --git a/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js b/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js index 454f3f6..c1bb4eb 100644 --- a/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js +++ b/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js @@ -182,15 +182,18 @@ Guacamole.RawAudioRecorder = function RawAudioRecorder(stream, mimetype) { var context = Guacamole.AudioContextFactory.getAudioContext(); /** - * A function which directly invokes the browser's implementation of - * navigator.mediaDevices.getUserMedia() with all provided parameters. - * - * @type Function + * Some browsers do not implement navigator.mediaDevices - this + * shims in this functionality to ensure code compatibility. */ - if (!navigator.mediaDevices) navigator.mediaDevices = {}; + /** + * Browsers that either do not implement navigator.mediaDevices + * at all or do not implement it completely need the getUserMedia + * method defined. This shims in this function by detecting + * one of the supported legacy methods. + */ if (!navigator.mediaDevices.getUserMedia) navigator.mediaDevices.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia
