Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RecordRTC.Storage in StereoAudioRecorder #504

Merged
merged 2 commits into from
Feb 26, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use RecordRTC.Storage in StereoAudioRecorder to allow context close w…
…ithin RecordRTC.close()
  • Loading branch information
Xavier Cloarec committed Apr 5, 2019
commit f8f1654fc9bc20a64c60e5c324ad67e3ddc2a05b
8 changes: 4 additions & 4 deletions dev/StereoAudioRecorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,15 @@ function StereoAudioRecorder(mediaStream, config) {
});
};

if (typeof Storage === 'undefined') {
var Storage = {
if (typeof RecordRTC.Storage === 'undefined') {
RecordRTC.Storage = {
AudioContextConstructor: null,
AudioContext: window.AudioContext || window.webkitAudioContext
};
}

if (!Storage.AudioContextConstructor) {
Storage.AudioContextConstructor = new Storage.AudioContext();
if (!RecordRTC.Storage.AudioContextConstructor || RecordRTC.Storage.AudioContextConstructor.state === 'closed') {
RecordRTC.Storage.AudioContextConstructor = new RecordRTC.Storage.AudioContext();
}

var context = Storage.AudioContextConstructor;
Expand Down