Home

Awesome

Video Player ANE (Android+iOS)

video player ANE supported on Android and iOS, lets you play video files in android or iOS players. your videos can be locally availble on your device or they can be online. in the sample codes we have also used our YouTube link parser found here: https://github.com/myflashlab/AS3-youtube-parser-video-link/ and with that you can easily play YouTube videos too.

find the latest asdoc for this ANE here.

AIR Usage

For the complete AS3 code usage, see the demo project here.

import com.myflashlab.air.extensions.player.*;

var _ex:VideoPlayer = new VideoPlayer();

// on Android, local videos must be in File.cacheDirectory. on iOS, they can be anywhere.
var vid:File = File.cacheDirectory.resolvePath("exVideoPlayer.mp4");
_ex.play(vid.nativePath, VideoType.LOCAL);

// or play online
_ex.play("https://myflashlabs.com/showcase/Bully_Scholarship_Edition_Trailer.mp4", VideoType.ONLINE);

// you can also play YouTube videos! please see the sample usage code for YouTube in the sample project

AIR .xml manifest

<!--
FOR ANDROID:
-->
		<uses-sdk android:targetSdkVersion="28"/>
		
		<application>
			<!--
				Change {PACKAGE_NAME} to your own applicationID
			-->
			<provider
				android:name="com.myflashlabs.videoPlayer.AneVideoProvider"
				android:authorities="{PACKAGE_NAME}.provider"
				android:exported="false"
				android:grantUriPermissions="true">
				<meta-data
					android:name="android.support.FILE_PROVIDER_PATHS"
					android:resource="@xml/video_player_ane_provider_paths"/>
			</provider>


			<activity>
				<intent-filter>
					<action android:name="android.intent.action.MAIN" />
					<category android:name="android.intent.category.LAUNCHER" />
				</intent-filter>
				<intent-filter>
					<action android:name="android.intent.action.VIEW" />
					<category android:name="android.intent.category.BROWSABLE" />
					<category android:name="android.intent.category.DEFAULT" />
				</intent-filter>
			</activity>
			
		</application>

		
<!--
FOR iOS:
-->
	<!-- Reqiered only if you are trying to load an online video with 'http' address -->
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
	</dict>



<!--
Embedding the ANE:
-->
<extensions>
	<extensionID>com.myflashlab.air.extensions.videoPlayer</extensionID>

	<!-- dependency ANEs -->
	<extensionID>com.myflashlab.air.extensions.dependency.androidx.core</extensionID>
    <extensionID>com.myflashlab.air.extensions.dependency.androidx.lifecycle</extensionID>
	<extensionID>com.myflashlab.air.extensions.dependency.overrideAir</extensionID>
</extensions>

Requirements

Commercial Version

https://www.myflashlabs.com/product/video-player-ane-adobe-air-native-extension/

Video Player ANE

Tutorials

How to embed ANEs into FlashBuilder, FlashCC and FlashDevelop

Premium Support

Premium Support package If you are an active MyFlashLabs club member, you will have access to our private and secure support ticket system for all our ANEs. Even if you are not a member, you can still receive premium help if you purchase the premium support package.