Copy link to clipboard
Copied
dear frieds,
I want to load mp4 file in ios, its loading in desktop while testing, not loading in ipad. pls help me iam using following code:
var nc: NetConnection = new NetConnection();
nc.connect(null);
var ns: NetStream = new NetStream(nc);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
ns.play("video.mp4");
function asyncErrorHandler(event: AsyncErrorEvent): void {
trace(event);
// ignore error
}
var vid: Video = new Video();
vid.attachNetStream(ns);
vid.width = 640;
vid.height = 360;
addChild(vid);
Thanks and Regards,
Syed Abdul Rahim
Copy link to clipboard
Copied
add video.mp4 to your included files panel.
if you think it's already added, attach a screenshot of the panel.
Copy link to clipboard
Copied
Hi,
I have the same problem. I want to load the mp4 file in ios and it doesn't work. You could help me, I just get it to load on the pc.
Thanks.
Copy link to clipboard
Copied
try with a an older (than 24) air version.
Copy link to clipboard
Copied
I'm using 28 air version. Thanks, I'm going to try 24 air version.
Copy link to clipboard
Copied
Hi,
I tried 24 air version and it didn't work. It gives me compile error.
What other option can I try?
Regards.
Copy link to clipboard
Copied
I'm not sure if straight net stream can handle H.264 on iOS. Also, for sure FLVPlayback doesn't. The best performance for playing H.264 is to use StageVideo, and it does work on iOS and Android. This 7 year old article is still useful: