You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am implementing a feature where users can watch videos in their selected language. I am using three react-player components to simultaneously play video, background sound, and voice (played in the language chosen by the user). However, I encounter an issue where intermittently the audio playback stops when changing the language while continuously updating the progress bar.
The problem seems to occur during the process of changing the language, where a new URL is set, and the seekTo method is used to move to the previous playback time. Despite attempting to address this by changing the URL upon language switch and using onReady to execute the seekTo method once prepared, the issue persists, albeit with some slight improvement.
I've verified that the 'playing' state remains true throughout this process. To summarize, the URL continuously changes, and upon each change, the seekTo method adjusts the playback time accordingly. However, during this process, the player intermittently stops. Do you have any insights into what might be causing this issue?
Below is the code for the player that changes according to the language.
This discussion was converted from issue #1767 on April 19, 2024 20:02.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am implementing a feature where users can watch videos in their selected language. I am using three react-player components to simultaneously play video, background sound, and voice (played in the language chosen by the user). However, I encounter an issue where intermittently the audio playback stops when changing the language while continuously updating the progress bar.
The problem seems to occur during the process of changing the language, where a new URL is set, and the seekTo method is used to move to the previous playback time. Despite attempting to address this by changing the URL upon language switch and using onReady to execute the seekTo method once prepared, the issue persists, albeit with some slight improvement.
I've verified that the 'playing' state remains true throughout this process. To summarize, the URL continuously changes, and upon each change, the seekTo method adjusts the playback time accordingly. However, during this process, the player intermittently stops. Do you have any insights into what might be causing this issue?
Below is the code for the player that changes according to the language.
<ReactPlayer url={voice[subtitleLang]} ref={audioPlayerRef2} onReady={() => { setAudioReady2(true); }} playing={ play && (onAudioBuffer2 || (!onBuffer && !onAudioBuffer)) } onBuffer={() => { setOnAudioBuffer2(true); }} onBufferEnd={() => { setOnAudioBuffer2(false); }} controls loop={false} muted={!useSound} ></ReactPlayer>
Beta Was this translation helpful? Give feedback.
All reactions