Skip to content

Commit 40ced3e

Browse files
update
1 parent 52a7eb9 commit 40ced3e

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/index.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@
313313
this.element.style.border = '5px solid ' + this.backgroundColor;
314314
this.iframe = document.createElement('iframe');
315315
this.iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin');
316+
this.iframe.setAttribute('allowfullscreen', 'true');
316317
if (this.iframeSrc !== null) {
317318
this.iframe.src = this.iframeSrc;
318319
} else if (this.iframeHtml !== null) {
@@ -3090,7 +3091,7 @@
30903091
interaction: true,
30913092
backgroundColor: '#444444',
30923093
innerHTML: `
3093-
<div id="videoControls_onOffButton" title="Watch a YouTube video.\n\nWhen switching on, the video will not play automatically, you need to press play.\nAfter pressing play, click outside the video to regain keyboard movement control." style="position: absolute; left: 35px; top: 35px; width: 80px; height: 80px; border: 5px solid #FFDF00; border-radius: 60px; background-color: transparent; box-shadow: 0 0 15px #FFDF00;">
3094+
<div id="videoControls_onOffButton" title="Watch a YouTube video.\n\nIf you see an 'Error 153' message when switching on, then switch off and on to try again." style="position: absolute; left: 35px; top: 35px; width: 80px; height: 80px; border: 5px solid #FFDF00; border-radius: 60px; background-color: transparent; box-shadow: 0 0 15px #FFDF00;">
30943095
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="position: absolute; left: 15px; top: 15px; width: 50px; height: 50px;" fill="#ffffff" stroke="none">
30953096
<path d="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13"></path>
30963097
</svg>
@@ -3101,20 +3102,22 @@
31013102
const fire = html3d.panels.find((so) => so.id === 'fire');
31023103
const onOffButton = document.getElementById('videoControls_onOffButton');
31033104
if (video.userData.isOn === false) {
3104-
video.iframe.src = 'https://www.youtube.com/embed/BiQXFKYa-co?autoplay=0&mute=0&controls=1&loop=0';
3105+
video.userData.isOn = true;
3106+
video.iframe.setAttribute('allow', 'autoplay;');
3107+
video.iframe.src = 'https://www.youtube-nocookie.com/embed/BiQXFKYa-co?autoplay=1&mute=0&controls=1&loop=0';
31053108
video.element.style.pointerEvents = 'auto';
31063109
video.element.style.userSelect = 'auto';
3107-
video.userData.isOn = true;
31083110
onOffButton.style.border = '5px solid #55F755';
31093111
onOffButton.style.boxShadow = '0 0 15px #00F700';
31103112
onOffButton.style.textShadow = '0 0 8px #55F755';
31113113
fire.element.style.visibility = 'hidden';
31123114
fire.localData.visible = false;
31133115
} else {
3116+
video.userData.isOn = false;
3117+
video.iframe.setAttribute('allow', '');
31143118
video.iframe.src = '';
31153119
video.element.style.pointerEvents = 'none';
31163120
video.element.style.userSelect = 'none';
3117-
video.userData.isOn = false;
31183121
onOffButton.style.border = '5px solid #FFDF00';
31193122
onOffButton.style.boxShadow = '0 0 15px #F77C00';
31203123
onOffButton.style.textShadow = '0 0 8px #F77C00';

0 commit comments

Comments
 (0)