var SoundButtonOn = document.getElementById('soundOff');
var SoundButtonOff = document.getElementById('soundOn');
SoundButtonOff.style.display='none';
var heroBackgroundVideo = document.querySelector('.herosection video');
function toggleVideoVolume() {
if (heroBackgroundVideo.muted !== false){
heroBackgroundVideo.muted=false;
SoundButtonOn.style.display = 'none';
SoundButtonOff.style.display = 'block';
} else {
heroBackgroundVideo.muted=true;
SoundButtonOn.style.display = 'block';
SoundButtonOff.style.display = 'none';
}
}
document.addEventListener('DOMContentLoaded', function() {
SoundButtonOn = document.getElementById('soundOff');
SoundButtonOff = document.getElementById('soundOn');
SoundButtonOff.style.display='none';
heroBackgroundVideo = document.querySelector('.herosection video');
SoundButtonOn.addEventListener('click', toggleVideoVolume);
SoundButtonOff.addEventListener('click', toggleVideoVolume);
});
window.addEventListener("orientationchange", function(event) {
var orientation = (window.screen.orientation || {}).type || window.screen.mozOrientation || window.screen.msOrientation;
if (["landscape-primary","landscape-secondary"].indexOf(orientation) !== -1) {
becomeFullscreen();
} else if (orientation === undefined) {
console.log("The orientation API isn't supported in this browser :(");
}
});
function becomeFullscreen(){
myVideo = document.getElementsByClassName("elementor-html5-video")[0]
if (myVideo.requestFullscreen) {
myVideo.requestFullscreen();
}
else if (myVideo.msRequestFullscreen) {
myVideo.msRequestFullscreen();
}
else if (myVideo.mozRequestFullScreen) {
myVideo.mozRequestFullScreen();
}
else if (myVideo.webkitRequestFullScreen) {
myVideo.webkitRequestFullScreen();
}
}
The gate to the Dolomites.