@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.js
CHANGED
|
@@ -47969,10 +47969,9 @@ var useMessageAudio = function(_ref) {
|
|
|
47969
47969
|
]);
|
|
47970
47970
|
useEffect10(function() {
|
|
47971
47971
|
var allowParallel = Boolean(providedPlaySegments);
|
|
47972
|
-
if (!allowParallel && isPlaying) return;
|
|
47972
|
+
if (!allowParallel && (isPlaying || audioPlayer.playing)) return;
|
|
47973
47973
|
if (pickLockRef.current) return;
|
|
47974
47974
|
if (audioQueue.length === 0) return;
|
|
47975
|
-
if (!allowParallel && audioPlayer.playing) return;
|
|
47976
47975
|
var candidate = null;
|
|
47977
47976
|
for(var i_3 = 0; i_3 < audioQueue.length; i_3++){
|
|
47978
47977
|
var msg = audioQueue[i_3];
|
|
@@ -47991,11 +47990,11 @@ var useMessageAudio = function(_ref) {
|
|
|
47991
47990
|
}
|
|
47992
47991
|
if (!candidate || candidate.segments.length === 0) return;
|
|
47993
47992
|
pickLockRef.current = true;
|
|
47994
|
-
setIsPlaying(true);
|
|
47993
|
+
if (!allowParallel) setIsPlaying(true);
|
|
47995
47994
|
setAudioQueue(function(prev_0) {
|
|
47996
47995
|
return prev_0.map(function(m_14) {
|
|
47997
47996
|
return m_14.id === candidate.messageId ? _objectSpread47(_objectSpread47({}, m_14), {}, {
|
|
47998
|
-
nextIndex:
|
|
47997
|
+
nextIndex: candidate.startIndex + candidate.segments.length
|
|
47999
47998
|
}) : m_14;
|
|
48000
47999
|
});
|
|
48001
48000
|
});
|
|
@@ -48058,6 +48057,9 @@ var useMessageAudio = function(_ref) {
|
|
|
48058
48057
|
}
|
|
48059
48058
|
};
|
|
48060
48059
|
runPlayback();
|
|
48060
|
+
if (allowParallel) {
|
|
48061
|
+
pickLockRef.current = false;
|
|
48062
|
+
}
|
|
48061
48063
|
}, [
|
|
48062
48064
|
audioQueue,
|
|
48063
48065
|
isPlaying,
|