File tree 1 file changed +8
-0
lines changed
src/components/VideoPlayer
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -494,6 +494,9 @@ function BaseVideoPlayer({
494
494
videoPlayerRef . current ?. setStatusAsync ?.( { rate : currentPlaybackSpeed } ) ;
495
495
} }
496
496
onLoad = { ( ) => {
497
+ if ( hasError ) {
498
+ setHasError ( false ) ;
499
+ }
497
500
if ( ! isCurrentlyURLSet || isUploading ) {
498
501
return ;
499
502
}
@@ -502,6 +505,11 @@ function BaseVideoPlayer({
502
505
onPlaybackStatusUpdate = { handlePlaybackStatusUpdate }
503
506
onFullscreenUpdate = { handleFullscreenUpdate }
504
507
onError = { ( ) => {
508
+ // No need to set hasError while offline, since the offline indicator is already shown.
509
+ // Once the user reconnects, if the video is unsupported, the error will be triggered again.
510
+ if ( isOffline ) {
511
+ return ;
512
+ }
505
513
setHasError ( true ) ;
506
514
} }
507
515
testID = { CONST . VIDEO_PLAYER_TEST_ID }
You can’t perform that action at this time.
0 commit comments