VideoObject(Video video, [ bool autoplay = false ])
Source
VideoObject(Video video, [bool autoplay = false]) {
_video = video;
_renderTexture = new RenderTexture.fromVideoElement(video.videoElement);
_renderTextureQuad = _renderTexture.quad;
var videoElement = video.videoElement;
videoElement.onEnded.listen((e) => this.dispatchEvent(new Event("videoEnded")));
videoElement.onPause.listen((e) => this.dispatchEvent(new Event("videoPause")));
videoElement.onError.listen((e) => this.dispatchEvent(new Event("videoError")));
videoElement.onPlay.listen((e) => this.dispatchEvent(new Event("videoPlay")));
if (autoplay) play();
}