fix autoplay for transcoded files
This commit is contained in:
parent
5766dc34b5
commit
8ce12f8e60
1 changed files with 4 additions and 1 deletions
|
@ -235,10 +235,13 @@ function VideoViewer(props: Props) {
|
|||
Promise.race([playPromise, timeoutPromise]).catch((error) => {
|
||||
if (typeof error === 'object' && error.name && error.name === 'NotAllowedError') {
|
||||
// Autoplay disallowed by browser
|
||||
player.play();
|
||||
}
|
||||
|
||||
// Autoplay failed
|
||||
if (PLAY_TIMEOUT_ERROR) {
|
||||
// Autoplay failed
|
||||
setIsLoading(false);
|
||||
setIsPlaying(false);
|
||||
} else {
|
||||
setIsLoading(false);
|
||||
setIsPlaying(false);
|
||||
|
|
Loading…
Reference in a new issue