I’m using openfl.media.Video to display an mp4 file on HTML5 targets.
It works great on all desktop browsers and even on firefox-mobile.
The only issue is its not working on chrome-mobile(v.41.0.2272.96) and opera-mobile (iOS7.1.2).
on chrome im getting a black rectangle. on iOS -just blank. i connected chrome via remote debugging and the console shows no error.
here is the code im running:
private var _video:Video;
private var _stream:NetStream;
private var _nc:NetConnection;
public function new(address:String)
{
_nc = new NetConnection();
_nc.connect(null);
_stream = new NetStream(_nc);
_video = new Video();
addChild(_video);
_stream.addEventListener(NetStatusEvent.NET_STATUS, onVideoLoaded);
_stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
_video.attachNetStream(_stream);
_stream.play(address);
}
private function onVideoLoaded(nsLoaded:NetStatusEvent):Void
{
if (nsLoaded.info.code == "NetStream.Play.Start"){}
else if(nsLoaded.info.code == 'NetStream.Play.Stop'){}
else if(nsLoaded.info.code == 'NetStream.Seek.InvalidTime'){}
}
private function asyncErrorHandler(e:AsyncErrorEvent):Void
{
trace('asyncErrorHandler', e.text);
}
I have the same issue right now on Android 5.1. I loaded sources into tags and specifying each format (mp4, webm, ogv). It works on Chrome and Firefox Desktop browsers but only works on Firefox mobile. Doesn’t work on Safari and Chrome mobile.
I connected Chrome via remote debugging and the console shows no error just like your case.
Any solution?
Hi all… Last week I had a real strange problem with video display. It displays ok on my samsung S5. However when I tried the same application on an SIII mini ( chrome ), video sound played ok but video didn’t displays ( noisy pixels ), however if I open the video Directly, it displays ok. I decided to keep the app as is and handle the video from Outside using Video Tag. Have to make several walkaorunds but it seems to be working ok.
var tu = ExternalInterface.call(“testEnd”, false);
To throw up the ended event.
I am mostly interested to test it up in several phones, if someone has time to test it and let me know if it works ok or not I would really appreciate.