ios-videoplay
A simple haxelib for video playback on iOS HaxeFlixel.
Installation
To install ios-videoplay, follow these steps:
-
Install the latest stable version with this command:
haxelib install ios-videoplayYou can also install through Git for the latest updates.
haxelib git ios-videoplay https://github.com/Joalor64/ios-videoplay -
Add this code to your
Project.xml:<haxelib name="ios-videoplay" if="ios" />
Usage Example
#if ios
import iosvideo.IOSVideo;
#end
import flixel.FlxBasic;
class VideoPlayer extends FlxBasic
{
public var finishCallback:Void->Void = null;
public function new(name:String)
{
super();
#if ios
IOSVideo.play('assets/videos/$name.mp4'); // the video format must be .mp4
IOSVideo.onComplete = function()
{
if (finishCallback != null)
{
finishCallback();
}
}
#end
}
}
Licensing
ios-videoplay is made available under the MIT License. Check LICENSE for more information.
Credits
- Joalor64 - Creator of ios-videoplay