@superinterface/react 5.3.0-beta.15 → 5.3.0-beta.16
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/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -48118,10 +48118,9 @@ var useMessageAudio = function(_ref) {
|
|
|
48118
48118
|
]);
|
|
48119
48119
|
(0, import_react67.useEffect)(function() {
|
|
48120
48120
|
var allowParallel = Boolean(providedPlaySegments);
|
|
48121
|
-
if (!allowParallel && isPlaying) return;
|
|
48121
|
+
if (!allowParallel && (isPlaying || audioPlayer.playing)) return;
|
|
48122
48122
|
if (pickLockRef.current) return;
|
|
48123
48123
|
if (audioQueue.length === 0) return;
|
|
48124
|
-
if (!allowParallel && audioPlayer.playing) return;
|
|
48125
48124
|
var candidate = null;
|
|
48126
48125
|
for(var i_3 = 0; i_3 < audioQueue.length; i_3++){
|
|
48127
48126
|
var msg = audioQueue[i_3];
|
|
@@ -48140,11 +48139,11 @@ var useMessageAudio = function(_ref) {
|
|
|
48140
48139
|
}
|
|
48141
48140
|
if (!candidate || candidate.segments.length === 0) return;
|
|
48142
48141
|
pickLockRef.current = true;
|
|
48143
|
-
setIsPlaying(true);
|
|
48142
|
+
if (!allowParallel) setIsPlaying(true);
|
|
48144
48143
|
setAudioQueue(function(prev_0) {
|
|
48145
48144
|
return prev_0.map(function(m_14) {
|
|
48146
48145
|
return m_14.id === candidate.messageId ? _objectSpread47(_objectSpread47({}, m_14), {}, {
|
|
48147
|
-
nextIndex:
|
|
48146
|
+
nextIndex: candidate.startIndex + candidate.segments.length
|
|
48148
48147
|
}) : m_14;
|
|
48149
48148
|
});
|
|
48150
48149
|
});
|
|
@@ -48207,6 +48206,9 @@ var useMessageAudio = function(_ref) {
|
|
|
48207
48206
|
}
|
|
48208
48207
|
};
|
|
48209
48208
|
runPlayback();
|
|
48209
|
+
if (allowParallel) {
|
|
48210
|
+
pickLockRef.current = false;
|
|
48211
|
+
}
|
|
48210
48212
|
}, [
|
|
48211
48213
|
audioQueue,
|
|
48212
48214
|
isPlaying,
|