thatguy64 Posted October 2, 2015 Share Posted October 2, 2015 So I'm getting to a point in my game where I'm mostly done with the mechanics and I want start putting in video sequences in between the levels. But I don't know how, I was wondering if something like this would work: var v = new Video();v.src = "mov_bbb.mp4";var c = document.getElementById("myCanvas");var ctx = c.getContext("2d");v.play();function render(){ ctx.drawImage(v, 0, 0);}setInterval(render,100); If not, how may I accomplish this? Quote Link to comment Share on other sites More sharing options...
lightest Posted October 2, 2015 Share Posted October 2, 2015 Perhaps it would be better to pause the game, hide canvas and show specially dedicated video tag. Then by handling ended event show game canvas again and hide the video. Quote Link to comment Share on other sites More sharing options...
thatguy64 Posted October 2, 2015 Author Share Posted October 2, 2015 Maybe, but if it was a canvas element I wouldn't have to mess with css. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.