Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Commit

Permalink
Add workaround for Firefox bug 934512
Browse files Browse the repository at this point in the history
  • Loading branch information
sole committed Jan 20, 2016
1 parent 630d67e commit a327086
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mediadevices-to-mediastreamaudiosourcenode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ window.onload = function () {
})
.then(function (stream) {
var audioContext = new AudioContext();
var mediaStreamNode = audioContext.createMediaStreamSource(stream);
mediaStreamNode.connect(audioContext.destination);
var mediaStreamNode = audioContext.createMediaStreamSource(stream);
mediaStreamNode.connect(audioContext.destination);

// This is a temporary workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=934512
// where the stream is collected too soon by the Garbage Collector
window.doNotCollectThis = stream;
});

};
Expand Down

0 comments on commit a327086

Please sign in to comment.