ANE-Video is a native extension for playing videos on iOS and Android. The extension can play a remote video using its URL, showing a graphical player during the reproduction. It’s possible to show and hide the player, as well as enqueue songs for playing.

After a video is reproduced, the next one in the queue is played. An event is fired every time the current video changes. It’s also possible to clear the queue or jump to the next video available.


import com.freshplanet.ane.AirVideo.AirVideo;

private var _videoList:Array;

protected function get videoList() : Array {
	if (_videoList == null)	{
		var listFile:File = File.applicationDirectory.resolvePath("videos.txt");
		var listStream:FileStream = new FileStream();, FileMode.READ);
		var list:String = listStream.readUTFBytes(listStream.bytesAvailable);
		_videoList = list.split("\n");

	return _videoList; 

protected function onAddedToStage(event:Event):void {
	AirVideo.getInstance().logEnabled = true;
	AirVideo.getInstance().addEventListener(AirVideo.CURRENT_VIDEO_CHANGED, onCurrentVideoChanged, false, 0, true);

	for each (var video:String in videoList) {

protected function onCurrentVideoChanged(event:Event):void {
	trace("Current video: " + AirVideo.getInstance().currentVideo + " - " + AirVideo.getInstance().queue.length + " videos in queue");
	if (AirVideo.getInstance().currentVideo == null) {
Air Native Extension, Android, iOS . URL.