abcjs
abcjs copied to clipboard
Error in playback using Chrome Version 96.0.4664.27 (Official Build) beta (64-bit) on Ubuntu 20.04
I'm seeing an issue with playing music back using the Editor code. I tried to play back the ABC music on this page:
https://wellington.session.nz/tunes/air-tune-the.html
I've tried with other tunes on the page https://wellington.session.nz/tunes_archive/ - similar problems
When I hit the playback arrow below the music I get a spinning arrow and error messages that look like these (tens of messages in the tunes I tried)
VM6:731 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at shouldExemptMethod (
That site uses abcjs beta 33. I've also tried against my development site at dev.session.nz running beta 35 - same problem.
I don't see an issue with Firefox or with Chrome Version 92
I added some debugging code on an internal server:
var copyToChannel = function copyToChannel(toBuffer, fromBuffer, start) { console.log(toBuffer, fromBuffer, start); for (var ch = 0; ch < 2; ch++) { console.log("getting fromData: channel ", ch); var fromData = fromBuffer.getChannelData(ch); console.log("getting toData: channel ", ch); var toData = toBuffer.getChannelData(ch); // Mix the current note into the existing track
for (var n = 0; n < fromData.length; n++) {
toData[n + start] += fromData[n];
}
} };
and I get messages like:
AudioBuffer {length: 1890420, duration: 42.86666666666667, sampleRate: 44100, numberOfChannels: 2} AudioBuffer {length: 16170, duration: 0.36666666666666664, sampleRate: 44100, numberOfChannels: 2} 455700 getting fromData: channel 0
VM6:731 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at shouldExemptMethod (
I'm reading this as the problem lies when the line:
var fromData = fromBuffer.getChannelData(ch);
is executed.
Any hints?
I've done some more on this. It's an issue with the DuckDuckGo security extension for both Chrome and Firefox.
https://chrome.google.com/webstore/detail/duckduckgo-privacy-essent/bkdgflcldnnnapblkhphbgpggdiikppg https://addons.mozilla.org/en-US/firefox/addon/duckduckgo-for-firefox/
This has been recently updated so I suspect that's why it's appeared suddenly - I will attempt to lodge a bug with them.
Andy
I guess all I can do is give a clearer error message in this case. I guess the immediate problem is the return value from the processing in the variable renderedBuffer is not delivered. I suspect that the mp3 was blocked from loading, perhaps? Is there anything funny in the browser's network tab?
When I get a moment I'll install that plugin and see if I can reproduce. It won't be right away, though.
I can't imagine that plugin interfering with the audio processing itself. That's why I would look at blocking the file load first.