     import flash.utils.Timer;
     import org.hola.ZErr;
     import org.hola.Base64;
+    import org.hola.WorkerUtils;
+    import org.hola.HEvent;
     import org.mangui.hls.loader.FragmentLoader;
 
     public dynamic class JSURLStream extends URLStream {
         private var _connected : Boolean;
         private var _resource : ByteArray = new ByteArray();
+        private var _curr_data : Object;
         public var holaManaged:Boolean = false;
         public static var jsApiInited:Boolean = false;
         public static var reqCount:Number = 0;

        }

        protected function resourceLoadingError() : void {
            this.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
        }

        protected function resourceLoadingSuccess() : void {
            this.dispatchEvent(new Event(Event.COMPLETE));
        }
    }
}

            return _resource.readUnsignedShort();
        }

        override public function readBytes(bytes : ByteArray,
            offset : uint = 0, length : uint = 0) : void
        {
            if (!holaManaged)
                return super.readBytes(bytes, offset, length);
            _resource.readBytes(bytes, offset, length);
        }

        override public function close() : void {
            if (holaManaged)
            {
                if (reqs[req_id])
                    _trigger('abortFragment', {req_id: req_id});
                WorkerUtils.removeEventListener(HEvent.WORKER_MESSAGE, onmsg);
            }
            if (super.connected)
                super.close();
            _connected = false;
