                     _videoWidth = videoWidth;
                     _resize();
                     if (ExternalInterface.available) {
-                        ExternalInterface.call("onVideoSize", _videoWidth, _videoHeight);
+                        if(_externalEventsMode === 1) {
+                            ExternalInterface.call("flashlsEvents.onVideoSize", ExternalInterface.objectID, _videoWidth, _videoHeight);
+                        } else {
+                            ExternalInterface.call("onVideoSize", _videoWidth, _videoHeight);
+                        }
                     }
                 }
             }

        protected var _duration : Number;
        /** URL autoload feature */
        protected var _autoLoad : Boolean = false;

        /** Initialization. **/
        public function ChromelessPlayer() {


        protected function _stateHandler(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                if(_externalEventsMode === 1) {
                    ExternalInterface.call("flashlsEvents.onState", ExternalInterface.objectID, event.state);
                } else {
                    ExternalInterface.call("onState", event.state);
                }
            }
        };

        protected function _levelSwitchHandler(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                if(_externalEventsMode === 1) {
                    ExternalInterface.call("flashlsEvents.onSwitch", ExternalInterface.objectID, event.level);
                } else {
                    ExternalInterface.call("onSwitch", event.level);
                }
            }
        };

        protected function _audioTracksListChange(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                if(_externalEventsMode === 1) {
                    ExternalInterface.call("flashlsEvents.onAudioTracksListChange", ExternalInterface.objectID, _getAudioTrackList());
                } else {
                    ExternalInterface.call("onAudioTracksListChange", _getAudioTrackList());
                }
            }
        }

        protected function _audioTrackChange(event : HLSEvent) : void {
            if (ExternalInterface.available) {
                if(_externalEventsMode === 1) {
                    ExternalInterface.call("flashlsEvents.onAudioTrackChange", ExternalInterface.objectID, event.audioTrack);
                } else {
                    ExternalInterface.call("onAudioTrackChange", event.audioTrack);
                }
            }
        }

