mangui/flashls

A small question/problem from a beginner

kerike opened this issue · 2 comments

Hi guys,

I am somewhat of a beginner in this field of video processing. I was looking for a solution to play hls streams on Android. So I've created a mobile application in Flash Builder 4.6 included the swc, but when I'm trying it to test it on my local machine it gives an exception:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at org.mangui.osmf.plugins.loader::HLSLoaderBase/_manifestLoadedHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.mangui.hls::HLS/dispatchEvent()
at org.mangui.hls.loader::LevelLoader/_parseLevelPlaylist()
at org.mangui.hls.playlist::Manifest/onLoadedData()
at org.mangui.hls.playlist::Manifest/_loadCompleteHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

This is how I included the plugin:

factory = new DefaultMediaFactory();
factory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD, onPluginLoad);
factory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD_ERROR, onPluginLoadError);

var resource:PluginInfoResource = new PluginInfoResource(new HLSPlugin());
factory.loadPlugin(resource);

}

private function onPluginLoad(event:MediaFactoryEvent):void {
trace("The plug-in loaded successfully.");
var resource:URLResource = new URLResource("http://184.72.239.149/vod/smil:BigBuckBunny.smil/playlist.m3u8");

var media:MediaElement = factory.createMediaElement(resource);
mediaPlayer = new MediaPlayer();
mediaPlayer.media = media;
//mediaPlayer.autoPlay = true;
var mediaContainer:MediaContainer = new MediaContainer();
mediaContainer.addMediaElement(media);
addChild(mediaContainer);

}

Could anyone help me out with some directives on how can we get this to work, if it can be done?

Thank you.

Hi I also have same problem. If I have a sample of osmf plugin for user owned OSMF base player,
like DENIVIP OSMF HLS Plugin
around # 2. For your own OSMF player you have two options:
I would be very appreciated.
Thank you in advance.

Sorry, I resolved this issue referring #203
StreamingURLResource should be used instead of URLResource.
Thanks