Open stijndeschuymer opened 3 years ago
https://github.com/chrisguttandin/standardized-audio-context Maybe this can help?
Fixed by #71 , I can do separate PR if needed
_createConstantSource() {
if (this._audioCtx) {
if (this._audioCtx.createConstantSource) {
return this._audioCtx.createConstantSource();
}
// not really a constantSourceNode, just a looping buffer filled with the offset value
const constantSourceNode = this._audioCtx.createBufferSource();
const constantBuffer = this._audioCtx.createBuffer(1, 1, this._audioCtx.sampleRate);
const bufferData = constantBuffer.getChannelData(0);
bufferData[0] = (0 * 1200) + 10;
constantSourceNode.buffer = constantBuffer;
constantSourceNode.loop = true;
return constantSourceNode;
}
}
Fixing createConstantSource and moving canvas creation to start did the trick.
Fixed in 4.0.0 release.
@stijndeschuymer Please close this issue if it is solved in 4.0.1
Hi, Thanks for your great library. I noticed the following: This line fails in Safari 14: https://github.com/t-mullen/video-stream-merger/blame/cf54b5fe3bc4f5624d719b064874e615757c8a12/src/index.js#L61
So either this needs to be added to the audioSupport check https://github.com/t-mullen/video-stream-merger/blob/gh-pages/src/index.js#L11
But I'd prefer to fix this _backgroundAudioHack function. maybe createConstantSource() could be replaced by AudioContext.createOscillator() ? Wdyt?
Thanks!