From 3abb6deb626c0682bf6d273fbbd9b6c0e6830cef Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 8 Feb 2021 16:04:51 -0500 Subject: [PATCH] Whispeak: Use StereoAudioRecorder in recorder - refs BT#18405 --- plugin/whispeakauth/assets/js/RecordAudio.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugin/whispeakauth/assets/js/RecordAudio.js b/plugin/whispeakauth/assets/js/RecordAudio.js index acaabf9998..35dfda0018 100644 --- a/plugin/whispeakauth/assets/js/RecordAudio.js +++ b/plugin/whispeakauth/assets/js/RecordAudio.js @@ -2,8 +2,7 @@ window.RecordAudio = (function () { var timerInterval = 0, - $txtTimer = null, - isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + $txtTimer = null; function startTimer() { stopTimer(); @@ -123,8 +122,10 @@ window.RecordAudio = (function () { localStream = stream; recordRTC = RecordRTC(stream, { - recorderType: isSafari ? RecordRTC.StereoAudioRecorder : RecordRTC.MediaStreamRecorder, - type: 'audio' + recorderType: RecordRTC.StereoAudioRecorder, + type: 'audio', + mimeType: 'audio/wav', + numberOfAudioChannels: 2 }); recordRTC.startRecording();