From 114623882371531734e26390bafe3705833485b2 Mon Sep 17 00:00:00 2001 From: Bot Bahlul <88623122+botbahlul@users.noreply.github.com> Date: Wed, 7 Aug 2024 00:43:29 +0800 Subject: [PATCH] Add files via upload --- js/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/index.js b/js/index.js index 8f4c499..d25a163 100644 --- a/js/index.js +++ b/js/index.js @@ -1797,7 +1797,9 @@ function embed(){ //if (!document.querySelector(".iframe_header_unit")) create_iframe_video_player(); if (document.querySelector("#my_video")) document.querySelector("#my_video").parentElement.removeChild(document.querySelector("#my_video")); var ytID = getYoutubePlayerID(url); - var src = "https://www.youtube.com/embed/" + ytID; + console.log('ytID =', ytID) + //var src = "https://www.youtube.com/embed/" + ytID; + var src = `https://www.youtube.com/embed/${ytID}`; url = src; console.log('document.querySelector("#my_iframe") =', document.querySelector("#my_iframe")); document.querySelector("#my_iframe").style.display = "block"; @@ -1846,8 +1848,8 @@ function embed(){ insert_videojs_script(); console.log('document.querySelector("#my_video") =', document.querySelector("#my_video")); document.querySelector("#my_video").style.display = "block"; - document.querySelector("#my_iframe").style.width = "1072px"; - document.querySelector("#my_iframe").style.height = "603px"; + document.querySelector("#my_video").style.width = "100%"; + document.querySelector("#my_video").style.height = "100%"; document.querySelector("#video_source").src = url; document.querySelector("#video_source").type = "application/x-mpegURL"; }