                 ExternalInterface.call("onError",event.message);
             }
         };
-        
+
         private function _fragmentHandler(event:HLSEvent):void {
             if (ExternalInterface.available) {
                 ExternalInterface.call("onFragment",event.metrics.bandwidth,event.metrics.level,event.metrics.screenwidth);
             }
         };
-        
+
         private function _manifestHandler(event:HLSEvent):void {
             if (ExternalInterface.available) {
                 ExternalInterface.call("onManifest",event.levels[0].duration);

    import flash.media.SoundTransform;
    import flash.media.StageVideo;
    import flash.media.StageVideoAvailability;
    import flash.utils.setTimeout;    


    public class ChromelessPlayer extends Sprite {

            ExternalInterface.addCallback("getmaxBufferLength",_getmaxBufferLength);
            ExternalInterface.addCallback("getbufferLength",_getbufferLength);
            // Connect calls to JS.
            ExternalInterface.addCallback("playerLoad",_load);
            ExternalInterface.addCallback("playerPlay",_play);
            ExternalInterface.addCallback("playerPause",_pause);
            ExternalInterface.addCallback("playerResume",_resume);
            ExternalInterface.addCallback("playerSeek",_seek);
            ExternalInterface.addCallback("playerStop",_stop);
            ExternalInterface.addCallback("playerVolume",_volume);
            ExternalInterface.addCallback("playerSetLevel",_setLevel);
            ExternalInterface.addCallback("playerSetmaxBufferLength",_setmaxBufferLength);
            setTimeout(_pingJavascript,50);
        };

