GUACAMOLE-237: Simplify checks for mediaDevices and getUserMedia.
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/4c53f28a Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/4c53f28a Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/4c53f28a Branch: refs/heads/master Commit: 4c53f28aa235a1f9a883df3b9a101ae34821423d Parents: f6291c0 Author: Nick Couchman <[email protected]> Authored: Tue Jan 2 12:26:22 2018 -0500 Committer: Nick Couchman <[email protected]> Committed: Tue Jan 2 12:26:22 2018 -0500 ---------------------------------------------------------------------- guacamole-common-js/src/main/webapp/modules/AudioRecorder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/4c53f28a/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 3a73d1d..454f3f6 100644 --- a/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js +++ b/guacamole-common-js/src/main/webapp/modules/AudioRecorder.js @@ -188,10 +188,10 @@ Guacamole.RawAudioRecorder = function RawAudioRecorder(stream, mimetype) { * @type Function */ - if (navigator.mediaDevices === undefined) + if (!navigator.mediaDevices) navigator.mediaDevices = {}; - if (navigator.mediaDevices.getUserMedia === undefined) + if (!navigator.mediaDevices.getUserMedia) navigator.mediaDevices.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia
