Copy link to clipboard
Copied
I'm trying to play a recorded stream from flash media server on mobile devices. I'm able to play FLV files but F4V files (like the sample files included in the VOD application in FMS) won't play on iOS device (tested on iPad 1 and iPhone 4s).
The odd part is that this videos play fine in the simulators included in Flash Builder 4.6 and also in Android devices and BlackBerry Playbook.
FLV videos play fine in all devices and simulators.
Updating Air SDK to 3.4 didn't solve the problem.
I tried with Flash Builder 4.7 and didn't solve it neither.
Source:
....
protected var nc:NetConnection = new NetConnection();
protected var ns:NetStream;
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nc.connect("rtmp://server-url:port/application/instance/");
}
protected function onNetStatus(event:NetStatusEvent):void
{
if(event.info.code == "NetConnection.Connect.Success"){
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStreamStatus);
ns.client = this;
ns.play("mp4:folder/sample1_1000kbps.f4v");
var video:Video = new Video();
video.attachNetStream(ns);
container.addChild(video);
}
}
......
Events received from simulator:
NetConnection.Connect.Success
NetStream.Play.Reset
NetStream.Play.Start
NetStream.Buffer.Full
NetStream.Video.DimensionChange <--- Video playing
Events received from iOS device:
NetConnection.Connect.Success
NetStream.Play.Reset
NetStream.Play.Start
NetStream.Buffer.Full <-- Stuck, no video, no audio
Anyone has any idea? Why the f4v streams are not playing on iOS devices?
Regards
Copy link to clipboard
Copied
I don't know if this is helpful in your case but we're playing video within our ios ipad app ( air 3.4 ) using stage video.
The video is streamed from Vimoe pro ( HTTP Live Streaming )
Reliabity and Quality are great.
The Vimeo fees are only about $200 pa
Copy link to clipboard
Copied
Thank you @Ged_mc, it's nice to know that it works with HLS.
I think my problem is because we stream H264 through RTMP instead of HTTP, but dunno why it works in every scenario but iOS.
Copy link to clipboard
Copied
We also had it streaming from http on ios using stage video.
Again from Vimeo pro - before they added HLS