Some videos randomly pause for no reason (not buffering)

177 views Asked by At

I am using react-player (I don't think the issue is with the player). I have an application where I play videos in loop (without any sound) and sometimes the video just pauses. It is definitely not the buffer issue, since I am looping like 30 seconds long videos and they have loaded a long time ago by then.The one weird thing is that it only happens with Chrome (tested with Firefox and had no issues).

import ReactPlayer from 'react-player';

 <ReactPlayer
              onClick={handleTogglePlay}
              className="react-player"
              loop={true}
              url={playerSrc}
              playing={isPlaying}
              controls={false}
              muted={true}
              width="100%"
              height="100%"
              onError={handleError}
            />

I can't post playerSrc here, It is a simple 11 seconds long .mp4 video though. It maybe plays for 20 seconds then pauses. Doesn't throw any errors, just stops. Definitely not like RAM/GPU usage too, checked the stats.

Also, I thought maybe there is issue with just my Chrome browser so I tried these things:

  1. Reset flags chrome://flags/
  2. Cleared browser cache
  3. Tried incognito without any browser extensions
  4. Tried video.js instead of react-player.

It is absolutely imperative for my application that the videos play and don't just randomly stop. Anyone has any ideas?

2

There are 2 answers

0
HugoA On

Sorry for posting this as an answer but I don't have enough reps to comment. Would this be helpful to you ? https://github.com/cookpete/react-player/issues/1711 This issue has been opened with a workaround suggested.

0
Nikoala On

I am encountering a very similar problem in my own project ( random pause and can't start again without refresh page, i saw pause event is called in the player by sending event to my matomo instance but i don't understand why, playing well with other player and firefox). which version of react-player you are currently using? Have you found any workaround or solution since posting? Any insights or updates? Have a good day