Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS][tvOS] Video object doesn't playback MP4 H.264 videos #211

itlancer opened this issue Jan 24, 2020 · 0 comments

[iOS][tvOS] Video object doesn't playback MP4 H.264 videos #211

itlancer opened this issue Jan 24, 2020 · 0 comments


Copy link

@itlancer itlancer commented Jan 24, 2020

Problem Description

Video object doesn't playback MP4 H.264 videos with iOS and tvOS. NetStream dispatched NetStatusEvent event with NetStream.Play.Failed code.

It has been tested from AIR to latests AIR, AIR, AIR and AIR beta with many iOS devices. Also tested with Apple TV 4K A1842 with tvOS 13.3. Tested with multiple different videos.
Same problem in all cases.

It works fine using StageVideo for iOS and tvOS with any AIR version.
Also it works fine with Android with AIR, AIR and AIR beta.
Also it works fine with Windows and macOS with AIR and below.
Also it works fine with FLV H.263 videos with any AIR version, but FLV H.263 not supported in Media Encoder CC 2014 any more.
It doesn't work with Windows and macOS with AIR and later (AIR, AIR beta too) because of issue: #80.

Changing NetStream::useHardwareDecoder with AIR 32 and below doesn't help.
Changing NetStream::useHardwareDecoder to false with AIR 33 cause no video playback with any plaftrom: #155.

Tracker link:
Related (not the same) issues with video:

Steps to Reproduce

Launch code below with iOS or tvOS device with MP4 H.264 video. It will try to play video in loop.
Application example with sources and example of video attached.

package  {
	import flash.display.Sprite;
	public class H264VideoBug extends Sprite {
		private var ns:NetStream;
		private var video:Video = new Video();
		private var nc:NetConnection = new NetConnection();
		public function H264VideoBug() {

			nc.addEventListener(NetStatusEvent.NET_STATUS, ncHandler);
		private function ncHandler(e:NetStatusEvent):void {
			if ( == "NetConnection.Connect.Success"){
				ns = new NetStream(nc);
				ns.client = {onMetaData:getMeta, onPlayStatus:onPlayStatus};
				ns.addEventListener(NetStatusEvent.NET_STATUS, nsHandler);

		private function nsHandler(e:NetStatusEvent):void {
			if ( == "NetStream.Play.Stop"){;

		private function getMeta(mdata:Object):void { }

		private function onPlayStatus(infoObject:Object):void {
			if (infoObject.code == "NetStream.Play.Complete"){;

Actual Result:
White screen (stage color). No video playback. NetStream dispatch NetStream.Play.Failed.

Expected Result:
Video playback.

Known Workarounds

  • Use StageVideo or Stage3D VideoTexture but sometimes it is not an option when you need to use it with DisplayList layers and some other cases.
  • Use FLV H.263 video but it has poor performance and hard to encode such videos because there is no a lot of programs for that. Also in many cases there is no way to pre-encode videos if end user use own MP4 H.264 video for playback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.