     import org.hola.JSAPI;
     import org.hola.HSettings;
     import org.mangui.hls.event.HLSEvent;
+    import org.mangui.hls.constant.HLSPlayStates;
 
     public class HLSJS
     {

            hls.addEventListener(HLSEvent.FPS_DROP_SMOOTH_LEVEL_SWITCH,
                on_event);
            hls.addEventListener(HLSEvent.LIVE_LOADING_STALLED, on_event);
            // track duration events
            hls.addEventListener(HLSEvent.MANIFEST_LOADED, on_manifest_loaded);
            hls.addEventListener(HLSEvent.PLAYLIST_DURATION_UPDATED,
                on_playlist_duration_updated);
            // track playlist url
            hls.addEventListener(HLSEvent.MANIFEST_LOADING, on_manifest_loading);
            JSAPI.postMessage2({id: 'flashls.hlsNew', hls_id: hls.id});
        }



        private static function on_manifest_loading(e:HLSEvent):void{
            _url = e.url;
            _state = "LOADING";
            on_event(new HLSEvent(HLSEvent.PLAYBACK_STATE, _state));
        }

        private static function on_playback_state(e:HLSEvent):void{
            _state = e.state;
        }

        private static function on_event(e:HLSEvent):void{
