I have three modals containing a video. Each button opens the same modal but it shows a different video depending on the buttom you clicked. It works fine, but I want to shut off the sound when closing the modal. There is a function to do that named closeVideo(), but it only works for the first modal, and not for the others.
Is there a way to create just one function to shut off the sound of every modal?
<div class="modal">
<div class="modal-content">
<span class="btn-close" (click)='closeVideo()'>
<img src="../../../../../assets/img/close.svg" alt="close">
</span>
<iframe id="player" width="560" height="315" src="https://www.youtube.com/embed/N8ABAZvh8WE" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
<div class="modal">
<div class="modal-content">
<span class="btn-close" (click)='closeVideo()'>
<img src="../../../../../assets/img/close.svg" alt="close">
</span>
<iframe id="player" width="560" height="315" src="https://www.youtube.com/embed/rn937OyA00g" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
<div class="modal">
<div class="modal-content">
<span class="btn-close" (click)='closeVideo()'>
<img src="../../../../../assets/img/close.svg" alt="close">
</span>
<iframe id="player" width="560" height="315" src="https://www.youtube.com/embed/EUjWFr3w7RU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
closeVideo(){
let myPlayer = document.getElementById('player');
myPlayer.setAttribute("src", " ");
console.log('video is closed now!');
}
you can perform the following function in JavaScript
o
guardarlos en una variable y posteriormente recorrer esa variable y cerrar uno a uno
only do it in the event you want either by clicking or detecting the end of a video
real money casino free casino games online online gambling
Ursiyv – Free viagra sample sildenafil citrate 25mg
how does vardenafil work https://vegavardenafil.com/ non-prescriptoin vardenafil
generic tadalafil 40 mg https://elitadalafill.com/ tadalafil 40 mg from india
alprostadil or yohimbine https://alprostadildrugs.com/ erection injection medicine
good post, i love it
sildenafil canada over the counter https://eunicesildenafilcitrate.com/ sildenafil 1mg
Flvabs – viagra 100mg australia Kdisuv wwlbcn
dating personals
[url=”http://stfreeonlinedating.com/?”]local dating sites for free [/url]
online dating site
[url=”http://stfreeonlinedating.com/?”]date sites [/url]
free single chat
[url=”http://stfreeonlinedating.com/?”]date sites [/url]
personals sites
[url=”http://freedatingsitesus.com/?”]dating online dating [/url]
all free dating
[url=”http://freedatingste.com/?”]local dating sites for free [/url]
Ikaefk – tadacip 96653 Krrxik bahbpw