From 2c6685323af0e36a8af5645d5448bc1300ae8b81 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 28 Dec 2017 17:37:07 +0400 Subject: [PATCH] Upgrade opus-recorder Enable record voice messages in latest Safari Closes #1535 --- app/index.html | 2 +- app/vendor/recorderjs/recorder.min.js | 2 +- app/webogram.appcache | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/index.html b/app/index.html index 96b12467..77a95e09 100644 --- a/app/index.html +++ b/app/index.html @@ -79,7 +79,7 @@ - + diff --git a/app/vendor/recorderjs/recorder.min.js b/app/vendor/recorderjs/recorder.min.js index 8f1e5ec3..95b22684 100755 --- a/app/vendor/recorderjs/recorder.min.js +++ b/app/vendor/recorderjs/recorder.min.js @@ -1 +1 @@ -"use strict";var root="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;!function(e){var t=function(n){var i=this;if(!t.isRecordingSupported())throw new Error("Recording is not supported in this browser");this.state="inactive",this.eventTarget=e.document.createDocumentFragment(),this.audioContext=new e.AudioContext,this.monitorNode=this.audioContext.createGain(),this.config=n=n||{},this.config.command="init",this.config.bufferLength=n.bufferLength||4096,this.config.monitorGain=n.monitorGain||0,this.config.numberOfChannels=n.numberOfChannels||1,this.config.originalSampleRate=this.audioContext.sampleRate,this.config.encoderSampleRate=n.encoderSampleRate||48e3,this.config.encoderPath=n.encoderPath||"encoderWorker.min.js",this.config.streamPages=n.streamPages||!1,this.config.leaveStreamOpen=n.leaveStreamOpen||!1,this.config.maxBuffersPerPage=n.maxBuffersPerPage||40,this.config.encoderApplication=n.encoderApplication||2049,this.config.encoderFrameSize=n.encoderFrameSize||20,this.config.resampleQuality=n.resampleQuality||3,this.config.streamOptions=n.streamOptions||{optional:[],mandatory:{googEchoCancellation:!1,googAutoGainControl:!1,googNoiseSuppression:!1,googHighpassFilter:!1}},this.setMonitorGain(this.config.monitorGain),this.scriptProcessorNode=this.audioContext.createScriptProcessor(this.config.bufferLength,this.config.numberOfChannels,this.config.numberOfChannels),this.scriptProcessorNode.onaudioprocess=function(e){i.encodeBuffers(e.inputBuffer)}};t.isRecordingSupported=function(){return e.AudioContext&&e.navigator&&(e.navigator.getUserMedia||e.navigator.mediaDevices&&e.navigator.mediaDevices.getUserMedia)},t.prototype.addEventListener=function(e,t,n){this.eventTarget.addEventListener(e,t,n)},t.prototype.clearStream=function(){this.stream&&(this.stream.getTracks?this.stream.getTracks().forEach(function(e){e.stop()}):this.stream.stop(),delete this.stream)},t.prototype.encodeBuffers=function(e){if("recording"===this.state){for(var t=[],n=0;n