I used the experimental script in the tutorial to play the video. How to make it play when it enters the scene without clicking the play button?
Which script, do you have a link?
Edit*
Never mind, I think I can write a short script to play a video. It plays a video and removes it when finished.
Though you need to pause and resume the game.
var v = document.createElement('video');
v.autoplay=true;
v.src='http://localhost/d/test.mp4';
v.style.position='absolute';
v.style.left=v.style.top=0;
v.style.width='100%';
v.style.height='100%';
v.onended=function(){
//do something to resume the game here
document.getElementById('canvasArea').removeChild(v);
};
document.getElementById('canvasArea').appendChild(v);
The one in the wiki tutorial.
wiki.compilgames.net/doku.php/gd … yingvideos
Here’s the sample of my code looks like.
Try replacing “controls” with “autoplay”.
Or you can try my code above.
Thanks! I’m gonna try this one.
does it work?