From f0a658bb975ea0f0abc6bbcc692212bf08434606 Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Wed, 3 Jan 2018 12:19:48 -0500 Subject: [PATCH] GUACAMOLE-237: Update JSDoc comments for new code. --- .../src/main/webapp/modules/AudioRecorder.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js b/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js index 454f3f625..c1bb4ebff 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