mangui/flashls — pull request #38 by MyArcane (2014-08-11 15:48:29+00:00)
Title: OSMF error handling fixes

Hi Mangui :).

Here is a fix proposal to be able to catch OSMF MediaErrorEvent :
* When loading the HLS manifest if the server returns a 404 -> basic OSMF players should normally be able to catch it simply by listening MediaErrorEvent.MEDIA_ERROR :
```
var element : MediaElement = mediaFactory.createMediaElement(resource);
element.addEventListener(MediaErrorEvent.MEDIA_ERROR, onMediaError);

private function onMediaError(event : MediaErrorEvent) : void
{
log('onMediaError');
}
```
* Same issue during streaming (e.g 404 when loading fragments)

* https://github.com/MyArcane/OSMFSample/blob/master/src/com/myarcane/OSMFSample.as is a basic OSMF sample with the fixes added to the plugin. You can test the sample [here]( http://62.210.195.3/dm/flashls/OSMFSample.html?src=http://usp-ec.devdmc.net/4c1a4d3edede832bfd000002/528f59d1dede83037e999e46/abs-1385130623.ism/abs.m3u8) . Black listing the manifest or the fragment host with an http proxy (e.g Charles proxy) at start and during streaming should be enough to display the 'onMediaError' log within the console

This feature is really important to be able to adapt the player UI when catching media errors.

At your disposal.