Native Video Support For Android in Haxe Flixel using Java VideoView
- Saw (M.A. Jigsaw) me! - doing the hole code for the extension
#if android
import extension.videoview.VideoView;
#end
import flixel.FlxBasic;
class VideoPlayer extends FlxBasic {
public var finishCallback:Void->Void = null;
public function new(name:String) {
super();
#if android
VideoView.playVideo('file:///storage/emulated/0/Videos/video.mp4');// the video can be in any format webm mkv any
VideoView.onCompletion = function(){
if (finishCallback != null){
finishCallback();
}
}
#end
}
}