error : Unsafe attempt to load URL…
- User
error : Unsafe attempt to load URL file:///C:/Users/ClimateChange01/Documents/ieqv2/assets/subtitles/ventilation/ventilation-jap.vtt from frame with URL file:///C:/Users/ClimateChange01/Documents/ieqv2/index.html. 'file:' URLs are treated as unique security origins.
</div> <div class="videobar"> <div class="tool-tip" id="tooltip"> <!-- <img src="./assets/Tooltiprl.png"> --> <p>Please select a video title from either side to play </p> </div> <div class="sub-container" id="subtitles"> <div class="subtitle-buttons" style="flex-direction:row;"> <p>SUBTITLES</p> </div> <div class="subtitle-buttons"> <div class="sub-button" onclick="setSubtitles('fre')">FRENCH </div> <div class="sub-button" onclick="setSubtitles('jap')">JAPANESE </div> <div class="sub-button" onclick="setSubtitles('spa')">SPANISH </div> </div> </div> </div> <div class="logo"> <img src="./assets/Daikin Logo 1080.png" style="width: 100%;"> </div> <div class="video-container"> <div class="video-heading"> <strong>I</strong>ndoor <strong>E</strong>nvironment <strong>Q</strong>uality</div> <style> video::cue { font-size: 50px; z-index: 1000; position: relative; } </style> <video src="" autoplay controls style="display: none; width: 100% ; height:75%" id="videoPlayer" class="videosection"> <track default id="track" kind="subtitles" src="" srclang="en" label="Subtitle"> </video> <img src="./assets/IEQ Background 1.gif" id="gifPlaceholder" style=" width: 100%; height: 75%;" /> </div> <div class=" section right"> <!-- <div class="heading-right"> IEQ in the DC Office</div> --> <div class="buttons" id="right-buttons"> </div> </div>let selectedSubtitle = null, isSubtitle = true, isVideoPlaying=false
createVideoButtons(videos)// to create right side video buttons from [./assets/videos/config.js] const showSubs=()=>{ console.log(tooltip); if(isVideoPlaying ){ tooltip.style.display="none" subtitles.style.display=isSubtitle?"block":"none"
}else{ tooltip.style.display="block" subtitles.style.display="none" } } function createVideoButtons(videoArray) { const containerDiv = document.getElementById('right-buttons'); for (const videoObj of videoArray) { const videoButton = document.createElement('div'); videoButton.classList.add('vid-button-right'); videoButton.textContent = videoObj.label; if(videoObj.disabled){ videoButton.classList.add('disabled') }else{ videoButton.onclick = () => playVideo(
./assets/videos/${videoObj.fileName}, false) }; containerDiv.appendChild(videoButton); } vidButtonsRight = document.querySelectorAll('.vid-button-right'); vidButtonsRight.forEach(button => { button.addEventListener('click', function () { // Remove 'active' class from all buttons if (this.classList.contains("disabled")) return removeActiveButton()// Add 'active' class to the clicked button this.classList.add('right-active'); }); - Assistant