Skip to content

Commit 3cc4afa

Browse files
authored
Merge pull request #56496 from linhvovan29546/fix/55965-android-paused-video-start-playing-when-enable-fullscreen
fix: paused video auto start when enable fullscreen mode
2 parents 52666fb + b1c0f23 commit 3cc4afa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/components/VideoPlayer/BaseVideoPlayer.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -489,15 +489,18 @@ function BaseVideoPlayer({
489489
isLooping={isLooping}
490490
onReadyForDisplay={(e) => {
491491
isReadyForDisplayRef.current = true;
492-
if (isCurrentlyURLSet && !isUploading) {
493-
playVideo();
494-
}
495492
onVideoLoaded?.(e);
496493
if (shouldUseNewRate) {
497494
return;
498495
}
499496
videoPlayerRef.current?.setStatusAsync?.({rate: currentPlaybackSpeed});
500497
}}
498+
onLoad={() => {
499+
if (!isCurrentlyURLSet || isUploading) {
500+
return;
501+
}
502+
playVideo();
503+
}}
501504
onPlaybackStatusUpdate={handlePlaybackStatusUpdate}
502505
onFullscreenUpdate={handleFullscreenUpdate}
503506
onError={() => {

0 commit comments

Comments
 (0)