From 2134dd89d8a9658bc8cb921a3b009c7f38b037d6 Mon Sep 17 00:00:00 2001 From: bonjinnorenka <32708102+bonjinnorenka@users.noreply.github.com> Date: Wed, 30 Aug 2023 00:40:03 +0900 Subject: [PATCH] improve return data Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com> --- assets/js/invidious_iframe_api.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/assets/js/invidious_iframe_api.js b/assets/js/invidious_iframe_api.js index e85a2a53..4690048e 100644 --- a/assets/js/invidious_iframe_api.js +++ b/assets/js/invidious_iframe_api.js @@ -310,12 +310,7 @@ class invidious_embed{ search_params.append('widgetid',invidious_embed.widgetid); this.widgetid = invidious_embed.widgetid; invidious_embed.widgetid++; - if(autoplay){ - search_params.append('autoplay',1); - } - else{ - search_params.append('autoplay',0); - } + search_params.append('autoplay', Number(autoplay)); if(this.option_playerVars!==undefined){ for(var x in this.option_playerVars){ if(x!=='autoplay'&&x!=='start'&&x!=='end'){ @@ -361,7 +356,7 @@ class invidious_embed{ } async getVideoEmbedCode(){ var title = await this.getVideoTitle(); - return ''; + return ''; } getCurrentTime(){ return this.promise_send_event('getcurrenttime');