spactureai-mobile-player 1.0.34 → 1.0.35
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.
|
@@ -754,12 +754,17 @@ final class HybridVideoPlayer: HybridVideoPlayerSpec, VLCPlaybackDelegateOwner {
|
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
private func emitPlaybackState() {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
757
|
+
// Match Android / `onPlaybackStateChangeData`: `isPlaying` is the
|
|
758
|
+
// decoder's play flag; `isBuffering` is separate. Combining them
|
|
759
|
+
// (`isPlaying && !buffering`) meant JS never saw `isPlaying: true`
|
|
760
|
+
// while libvlc stayed in `.buffering` — DVR seek overlays waited for
|
|
761
|
+
// a signal that never arrived even though frames were advancing.
|
|
762
|
+
let vlcIsPlaying = mediaPlayer.isPlaying
|
|
763
|
+
if vlcIsPlaying != lastEmittedIsPlaying || isCurrentlyBuffering != lastEmittedIsBuffering {
|
|
764
|
+
lastEmittedIsPlaying = vlcIsPlaying
|
|
760
765
|
lastEmittedIsBuffering = isCurrentlyBuffering
|
|
761
766
|
_eventEmitter?.onPlaybackStateChange(
|
|
762
|
-
onPlaybackStateChangeData(isPlaying:
|
|
767
|
+
onPlaybackStateChangeData(isPlaying: vlcIsPlaying, isBuffering: isCurrentlyBuffering)
|
|
763
768
|
)
|
|
764
769
|
_eventEmitter?.onBuffer(isCurrentlyBuffering)
|
|
765
770
|
}
|