From 8923a8a84ac45afa1138bbb755c0a4da8a837d27 Mon Sep 17 00:00:00 2001 From: Julio Sgarbi Date: Mon, 31 Jul 2023 16:48:07 -0300 Subject: [PATCH] fix: LSDV-5460: Paragraph is sync with audio and isn't automatically pausing anymore --- src/tags/object/Paragraphs/model.js | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/tags/object/Paragraphs/model.js b/src/tags/object/Paragraphs/model.js index e055f3f37..627550db3 100644 --- a/src/tags/object/Paragraphs/model.js +++ b/src/tags/object/Paragraphs/model.js @@ -238,26 +238,11 @@ const PlayableAndSyncable = types.model() if (!audio) return; - if (!isFF(FF_LSDV_E_278)) { - const indices = self.regionIndicesByTime(time); - - // if we left current region's time, reset - if (!indices.includes(self.playingId)) { - self.stopNow(); - self.reset(); - return; - } - } - // so we are changing time inside current region only audio.currentTime = time; if (audio.paused && playing) { - if (isFF(FF_LSDV_E_278)) { - self.play(); - } else { - self.play(self.playingId); - } - } else if (isFF(FF_LSDV_E_278)) { + self.play(); + } else { self.trackPlayingId(); } }, @@ -364,7 +349,7 @@ const PlayableAndSyncable = types.model() }, play(idx) { - if (isFF(FF_LSDV_E_278) && !isDefined(idx)) { + if (!isDefined(idx)) { self.playAny(); return; } @@ -390,8 +375,7 @@ const PlayableAndSyncable = types.model() self.playing = true; self.playingId = idx; self.triggerSync('play'); - if (isFF(FF_LSDV_E_278)) self.trackPlayingId(); - else self.stopAtTheEnd(); + self.trackPlayingId(); }, })) .actions(self => ({