flashls
flashls copied to clipboard
I've got "#2032: Stream Error in iPad.
It's so good solution for HLS. Anyway, I want to build HLS player app, and do it with AIR. In PC and in android, it's fine, but in iPad (or iOS), I've got #2032 Error. Could you help me? I'm writing my codes.
Thank you so much for your great working.
package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.media.Video;
import org.mangui.hls.HLS; import org.mangui.hls.event.HLSEvent; import org.mangui.hls.utils.Log;
[SWF(backgroundColor="0x000000" , width="1280" , height="720" , frameRate="24")] public class HLSplayer_mobile extends Sprite { private var _hls:HLS;
private var _url:String = "http://streambox.fr/playlists/test_001/stream.m3u8";
public function HLSplayer_mobile() { super();
this.addEventListener( Event.ADDED_TO_STAGE, onAddedToStage ); }
protected function onAddedToStage( e:Event ):void { this.removeEventListener( Event.ADDED_TO_STAGE, onAddedToStage );
// support autoOrients stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE;
this._init(); }
protected function _init():void { this._hls = new HLS(); this._hls.stage = this.stage; this._hls.addEventListener(HLSEvent.MANIFEST_LOADED, this._manifestHandler); this._hls.load( this._url );
this.addVideo( this.stage.fullScreenWidth, this.stage.fullScreenHeight ); }
protected function addVideo( w:int, h:int ):void { var video:Video = new Video( w, h ); this.addChild( video ); video.x = 0; video.y = 0; video.smoothing = true; video.attachNetStream( this._hls.stream ); }
protected function _manifestHandler( e:HLSEvent ):void { var hls:HLS = e.target as HLS; hls.stream.play(); } } }
iOS doesn't support Flash?
He build an app with "adobe air"
Try add following keys <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key><true /> </dict> to <iPhone><InfoAdditions><![CDATA[ section in app.xml file