mangui / flashls

HLS Flash Plugin/Player (Chromeless,OSMF,FlowPlayer,mediaelement.js,video.js,Clappr)
http://www.flashls.org
Mozilla Public License 2.0
751 stars 264 forks source link

A small question/problem from a beginner #554

Open kerike opened 8 years ago

kerike commented 8 years ago

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.

takanoyasuhikotest01 commented 7 years ago

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.

takanoyasuhikotest01 commented 7 years ago

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