Update YouTube iframe source to include autoplay, controls, and mute options
This commit is contained in:
@@ -1806,7 +1806,7 @@ const SlideCreator = {
|
|||||||
// Create an iframe upfront
|
// Create an iframe upfront
|
||||||
const ytPlayerIframe = SlideUtils.createElement("iframe", {
|
const ytPlayerIframe = SlideUtils.createElement("iframe", {
|
||||||
id: `youtube-player-${itemId}`,
|
id: `youtube-player-${itemId}`,
|
||||||
src: `https://www.youtube-nocookie.com/embed/${videoId}?enablejsapi=1&origin=${encodeURIComponent(window.location.origin)}`,
|
src: `https://www.youtube-nocookie.com/embed/${videoId}?enablejsapi=1&autoplay=0&controls=0&playsinline=1&mute=${STATE.slideshow.isMuted ? 1 : 0}&origin=${encodeURIComponent(window.location.origin)}`,
|
||||||
style: "width: 100%; height: 100%; border: none;",
|
style: "width: 100%; height: 100%; border: none;",
|
||||||
allow: "autoplay; encrypted-media",
|
allow: "autoplay; encrypted-media",
|
||||||
referrerpolicy: "strict-origin-when-cross-origin",
|
referrerpolicy: "strict-origin-when-cross-origin",
|
||||||
|
|||||||
Reference in New Issue
Block a user