             _hls = hls;
             _defaultduration = duration;
             super(resource, new HLSNetLoader(hls));
+            _hls.addEventListener(HLSEvent.ERROR, _errorHandler);
         }
 
         protected function createVideo() : Video {

    import org.osmf.traits.SeekTrait;
    import org.osmf.traits.TimeTrait;
    import org.osmf.utils.OSMFSettings;
    
    CONFIG::LOGGING {
    import org.mangui.hls.utils.Log;

            var alternateAudioTrait : HLSAlternativeAudioTrait = new HLSAlternativeAudioTrait(_hls, this as MediaElement);
            addTrait(MediaTraitType.ALTERNATIVE_AUDIO, alternateAudioTrait);
        }

        private function _errorHandler(event : HLSEvent) : void {
            var errorCode : int = ErrorManager.getMediaErrorCode(event);
            var errorMsg : String = ErrorManager.getMediaErrorMessage(event);
            CONFIG::LOGGING {
            Log.warn("HLS Error event received, dispatching MediaError " + errorCode + "," + errorMsg);
            }
            dispatchEvent(new MediaErrorEvent(MediaErrorEvent.MEDIA_ERROR, false, false, new MediaError(errorCode, errorMsg)));
        }
    }
}
