Replies: 1 comment
-
Good Example:I'm trying to start a youtube video when a modal is opened and not progress to the next page until it is completed. My script below works in Chrome but produces this error in Firefox and Edge. Error Message :
<script src="http://www.youtube.com/player_api"></script>
<script>
// autoplay video
function onPlayerReady(event) {
event.target.playVideo();
}
// when video ends
function onPlayerStateChange(event) {
if(event.data === 0) {
alert('Thank you for watching - Click OK to see your results');
}
}
</script> I have reviewed this question/answer but cannot seem to get it working with my code by amending the http / https. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
提问规范
代码问题:
需要写明:
Beta Was this translation helpful? Give feedback.
All reactions