MP4 won't play on button click
I'm having issues getting an mp4 to play when I click a button. To simplify troubleshooting I started a new project with a video component and a button component and followed the steps on this page: Components in Animate
I followed the steps, have everything on frame one, and I'm using the below code. This is taken directly from the example page. The problem is that the video doesn't play when I click the button. It will play if I check "Autoplay" or make the controls visible and use those. I'm trying to figure this out before I integrate it into my actual project and make the video play with those buttons.
For clarity, Animate assigned the instance names "movieClip_2" to the button and "movieClip_3" to my video.
if (!this.movieClip_2_click_cbk) {
function movieClip_2_click(evt) {
console.log("Button clicked");
this.movieClip_3.on("added", function () {
$("#movieClip_3")[0].play();
}, this, true);
}
$("#dom_overlay_container").on("click", "#movieClip_2", movieClip_2_click.bind(this));
this.movieClip_2_click_cbk = true;
}
