mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
autoplay flag validation in HTMLVideo improved
This commit is contained in:
parent
8a93fa997b
commit
af84e3e2a4
1 changed files with 1 additions and 1 deletions
|
|
@ -374,7 +374,7 @@ function HTMLVideo(options) {
|
|||
case 'load': {
|
||||
if (commandArgs && commandArgs.stream && typeof commandArgs.stream.url === 'string') {
|
||||
command('stop');
|
||||
videoElement.autoplay = commandArgs.autoplay !== false;
|
||||
videoElement.autoplay = typeof commandArgs.autoplay === 'boolean' ? commandArgs.autoplay : true;
|
||||
videoElement.currentTime = !isNaN(commandArgs.time) && commandArgs.time !== null ? parseInt(commandArgs.time) / 1000 : 0;
|
||||
videoElement.src = commandArgs.stream.url;
|
||||
loaded = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue