From b2a3ffb8691b90be63ea7c66d0546eea9d471448 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Tue, 21 May 2024 12:16:41 +0300 Subject: [PATCH] refactor: move isloaded (3) --- src/WebOsVideo/WebOsVideo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WebOsVideo/WebOsVideo.js b/src/WebOsVideo/WebOsVideo.js index 3237605..58605e9 100644 --- a/src/WebOsVideo/WebOsVideo.js +++ b/src/WebOsVideo/WebOsVideo.js @@ -957,6 +957,8 @@ function WebOsVideo(options) { onPropChanged('stream'); videoElement.autoplay = typeof commandArgs.autoplay === 'boolean' ? commandArgs.autoplay : true; + isLoaded = true; + onPropChanged('loaded'); onPropChanged('paused'); onPropChanged('time'); onPropChanged('duration'); @@ -1011,7 +1013,6 @@ function WebOsVideo(options) { videoElement.src = stream.url; initMediaId(startVideo); - isLoaded = true; } else { onError(Object.assign({}, ERROR.UNSUPPORTED_STREAM, { critical: true,