abcjs 6.0.0-beta.38 → 6.0.0-beta.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE.md +8 -0
- package/dist/abcjs-basic-min.js +2 -2
- package/dist/abcjs-basic.js +23 -5
- package/dist/abcjs-basic.js.map +1 -1
- package/dist/abcjs-plugin-min.js +2 -2
- package/package.json +1 -1
- package/src/synth/create-synth.js +18 -4
- package/temp.txt +0 -0
- package/version.js +1 -1
package/dist/abcjs-basic.js
CHANGED
|
@@ -15367,11 +15367,29 @@ function CreateSynth() {
|
|
|
15367
15367
|
self.debugCallback("creationTime = " + Math.floor((activeAudioContext().currentTime - startTime) * 1000) + "ms");
|
|
15368
15368
|
}
|
|
15369
15369
|
|
|
15370
|
+
function resolveData(me) {
|
|
15371
|
+
var duration = me && me.audioBuffers && me.audioBuffers.length > 0 ? me.audioBuffers[0].duration : 0;
|
|
15372
|
+
return {
|
|
15373
|
+
status: activeAudioContext().state,
|
|
15374
|
+
duration: duration
|
|
15375
|
+
};
|
|
15376
|
+
}
|
|
15377
|
+
|
|
15370
15378
|
Promise.all(allPromises).then(function () {
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15379
|
+
// Safari iOS can mess with the audioContext state, so resume if needed.
|
|
15380
|
+
if (activeAudioContext().state === "suspended") {
|
|
15381
|
+
activeAudioContext().resume().then(function () {
|
|
15382
|
+
resolve(resolveData(self));
|
|
15383
|
+
});
|
|
15384
|
+
} else if (activeAudioContext().state === "interrupted") {
|
|
15385
|
+
activeAudioContext().suspend().then(function () {
|
|
15386
|
+
activeAudioContext().resume().then(function () {
|
|
15387
|
+
resolve(resolveData(self));
|
|
15388
|
+
});
|
|
15389
|
+
});
|
|
15390
|
+
} else {
|
|
15391
|
+
resolve(resolveData(self));
|
|
15392
|
+
}
|
|
15375
15393
|
});
|
|
15376
15394
|
});
|
|
15377
15395
|
};
|
|
@@ -28131,7 +28149,7 @@ module.exports = unhighlight;
|
|
|
28131
28149
|
\********************/
|
|
28132
28150
|
/***/ (function(module) {
|
|
28133
28151
|
|
|
28134
|
-
var version = '6.0.0-beta.
|
|
28152
|
+
var version = '6.0.0-beta.39';
|
|
28135
28153
|
module.exports = version;
|
|
28136
28154
|
|
|
28137
28155
|
/***/ })
|