             _duration = event.mediatime.duration;
             _media_position = event.mediatime.position;
             if (ExternalInterface.available) {
-                ExternalInterface.call("onPosition", event.mediatime);
+                if(_externalEventsMode === 1) {
+                    ExternalInterface.call("flashlsEvents.onPosition", ExternalInterface.objectID, event.mediatime);
+                } else {
+                    ExternalInterface.call("onPosition", event.mediatime);
+                }
             }
 
             var videoWidth : int = _video ? _video.videoWidth : _stageVideo.videoWidth;


        /** Notify javascript the framework is ready. **/
        protected function _pingJavascript() : void {
            ExternalInterface.call("onHLSReady", ExternalInterface.objectID);
        };

        /** Forward events from the framework. **/
        protected function _completeHandler(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                ExternalInterface.call("onComplete");
            }
        };

        protected function _errorHandler(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                var hlsError : HLSError = event.error;
                ExternalInterface.call("onError", hlsError.code, hlsError.url, hlsError.msg);
            }
        };

        protected function _fragmentLoadedHandler(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                ExternalInterface.call("onFragmentLoaded", event.loadMetrics);
            }
        };

        protected function _fragmentPlayingHandler(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                ExternalInterface.call("onFragmentPlaying", event.playMetrics);
            }
        };


            }

            if (ExternalInterface.available) {
                if(_externalEventsMode === 1) {
                    ExternalInterface.call("flashlsEvents.onManifest", ExternalInterface.objectID, _duration);
                } else {
                    ExternalInterface.call("onManifest", _duration);
                }
            }
        };

