From af84e3e2a4de7ecd11c41049ccfe0c2ee3da7929 Mon Sep 17 00:00:00 2001 From: nklhrstv Date: Fri, 20 Mar 2020 12:27:28 +0200 Subject: [PATCH] autoplay flag validation in HTMLVideo improved --- src/video/HTMLVideo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/HTMLVideo.js b/src/video/HTMLVideo.js index 8fc1dc064..5019e4a78 100644 --- a/src/video/HTMLVideo.js +++ b/src/video/HTMLVideo.js @@ -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;