I have a video iframe that starts playing automatically when the page loads:
<section>
<div class="row" >
<div style="padding-top: 56.25%">
<iframe
src="https://players.brightcove.net...&autoplay&muted&allowfullscreen&webkitallowfullscreen&loop&fullscreen"
allowfullscreen
webkitallowfullscreen
mozallowfullscreen
allow="encrypted-media"
style="
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
width: 100%;
height: 100%;
"
></iframe>
</div>
</div>
</section>
I am looking to trigger a function when the video is clicked by the user. Essentially, I want to navigate away from this component whenever the video is clicked (as it functions as a screen saver). How can I adjust the component to achieve this?
The issue I am facing is that the events on the outer divs are not triggered when the video is playing in the iframe. Upon clicking, it simply pauses/plays the video.