I wrote a video player plugin that plays a video over an event.
You can try this script to play a video.
makeEventVideo(this,'move file name',0,0,816,624);
$E(this).setPriorityType(3);
To stop the video:
$E(this).stopVideo();
Additionally, if your event is named 'Event001', you can replace this with 'Event001', for example:
makeEventVideo('Event001','movie1',0,0,816,624)
Spoiler
JavaScript:
//////////////////////////////////////////////////////////////////////
function $E(n){
if(n instanceof Game_Event) return n;
if(typeof n.eventId=='function') n = n.eventId();
return $gameMap._events[n]||$gameMap._events.find(function(e){return e&&e.event().name==n;})||$gameMap._events.find(function(e){return e&&e.event().note.contains(n);})||null;
}
function $spr(c){
if(c instanceof Game_Character == false){
c = $E(c);
}
if(!c) return null;
return SceneManager._scene._spriteset._characterSprites.find(function(s){return s._character==c;});
}
/////////////////////////////////////video player///////////////////////////////////////////
function makeEventVideo(e,name,x,y,w,h){
e = $E(e);
var spr = $spr(e);
spr.updateCharacterFrame();
x = x||0;
y=y||0;
w=w||spr.width;
h=h||spr.height;
var vp = 'movies/';
var v = e.video||document.createElement('video');
var s1 = document.createElement('source');
s1.type = 'video/webm';
s1.src = vp + name + '.webm';
var s2 = document.createElement('source');
s2.type = 'video/mp4';
s2.src = vp + name + '.mp4';
v.autoplay=false;
while(v.children.length) v.removeChild(v.children[0]);
v.append(s1,s2);
v.autoplay=false;
v.preload=true;
v.loop=true;
v.load();
v.play();
var bitmap = new Bitmap(w,h);
var sspr = new Sprite(bitmap);
sspr.video = v;
sspr.videox = x;
sspr.videoy = y;
spr.removeChildren();
spr.addChild(sspr);
sspr.update = function(){
this.x = -this.parent.x+this.videox;
this.y = -this.parent.y+this.videoy;
this.bitmap.canvas.getContext('2d').drawImage(this.video,0,0,this.width,this.height);
this.bitmap.baseTexture.update();
Sprite.prototype.update.call(this);
}
e.video = v;
e.stopVideo = function(){
this.video.pause();
$spr(this).removeChildren();
}
}