Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxied MediaElement in OSMF does not dispatch MediaError #103

Closed
hrasadi opened this issue Oct 14, 2014 · 4 comments
Closed

Proxied MediaElement in OSMF does not dispatch MediaError #103

hrasadi opened this issue Oct 14, 2014 · 4 comments
Labels

Comments

@hrasadi
Copy link

hrasadi commented Oct 14, 2014

Hi,

According to OSMF docs, I can receive a MediaError event when the media loading fails via this:

mediaplayer.addEventListener(MediaErrorEvent.MEDIA_ERROR, onMediaError)

flashhls by the way does not dispatch this event when for example URL is not found. My proposal is to add some few lines to HLSLoadFromDocumentElement class. In the class constructor we can add:

    loader.addEventListener(MediaErrorEvent.MEDIA_ERROR, onMediaError);

and re-dispatch it again:

private function onMediaError(event:MediaErrorEvent):void {
dispatchEvent(event.clone());
}

@hrasadi hrasadi changed the title Proxied MediaElement if OSMF does not dispatch MediaError Proxied MediaElement in OSMF does not dispatch MediaError Oct 14, 2014
@mangui
Copy link
Owner

mangui commented Oct 14, 2014

Hi @hrasadi this kind of error should be catched here :
https://github.com/mangui/flashls/blob/master/src/org/mangui/osmf/plugins/loader/HLSLoaderBase.as#L141-L149, then redispatched to LoadTrait.
is that what you observe ? do you mean that HLSLoadDocumentFromElement is not redispatching the error automatically to the mediaPlayer ?

@hrasadi
Copy link
Author

hrasadi commented Oct 14, 2014

That's exactly what I mean @mangui. There are cases that I want to receive these kind of events from MediaPlayer directly (which itself dispatches MediaElement events) but this proxy element does not dispatch errors.

@mangui
Copy link
Owner

mangui commented Oct 14, 2014

Hi @hrasadi,
then that sounds reasonable to do so.
I am including @myarcane to comment, as he contributed a couple of weeks back on flashls/OSMF error handling (see #38) and sometimes I am bit lost in OSMF jungle ;-)

@hrasadi
Copy link
Author

hrasadi commented Oct 14, 2014

@mangui I checked #38 and based on @myarcane's description it seems that my point is also covered. If so, it was my bad with my old version that caused the problem. I will test with a fresh checkout and reopen the issue if problem resists.

Sorry for the false alarm!

@hrasadi hrasadi closed this as completed Oct 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants