when call the NetConnection.connect(null) in my code
i got different event.info.code from NetStatusEvent.NET_STATUS
target flash will got “NetConnection.Connect.Success”
and
target html5(-Ddom) will got “connectSuccess”
this is a bug???
Haxe 3.4
Lime 5.3
OpenFL 6.0.0
Safari 10.1.2 (12603.3.8)
Chrome 60.0.3112.78
netConnection = new NetConnection ();
netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netConnection.connect(null);
private function netStatusHandler(event:NetStatusEvent):Void
{
trace("netStatus:"+event.info.code);
switch (event.info.code) {
case "NetConnection.Connect.Success","connectSuccess":
netStream = new NetStream (netConnection);
netStream.checkPolicyFile = true;
netStream.client = { onMetaData: client_onMetaData, onPlayStatus:onVideoStatus };
netStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, netStream_onAsyncError);
netStream.play("assets/example.mp4");
case "NetStream.Play.StreamNotFound":
trace("Unable to locate video");
}
}