mangui / mangui/flashls

A small question/problem from a beginner

Open
#554 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ActionScript
Stars
744
Forks
259
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported stack trace at org.mangui.osmf.plugins.loader::HLSLoaderBase/_manifestLoadedHandler() and review the plugin-loading and media setup shown in the issue. Reproduce the failure with the provided playlist URL in the Android/Flash Builder setup; done means identifying the cause of the null reference and confirming that the HLS stream loads successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.