hi i have a code that i want to autoplay some youtube videos in any device.the problem is that in mobile devices both android and ios the autoplay events are been disabled. so i want to create a function that will click the iframe. the code i have is the below
<iframe id="text" width="560" height="315" src="https://www.youtube.com/embed/5-RszQzQCvg" frameborder="0" allowfullscreen></iframe>
<form>
<input type="checkbox" id="myCheck" onmouseover="myFunction()">
</form>
<script>
function myFunction(){
document.getElementById("text").click();}
</script>
the problem is that when i mouseover the checkbox my function dosent work because the video dosent start.