 
 /**
  *  Dispatched when the <code>duration</code> property of the media has changed.
+ * 
+ *  <p>This event may not be dispatched when the source is set to null or a playback
+ *  error occurs.</p>
  * 
  *  @eventType org.osmf.events.TimeEvent.DURATION_CHANGE
  * 

import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.events.FlexEvent;
import mx.resources.IResourceManager;
import mx.resources.ResourceManager;


        if (scaleMode == value)
            return;
        
        switch(value)
        {
            case ScaleMode.NONE:
                _scaleMode = ScaleMode.NONE;
                break;
            case ScaleMode.STRETCH:
                _scaleMode = ScaleMode.STRETCH;
                break;
            case ScaleMode.LETTERBOX:
                _scaleMode = ScaleMode.LETTERBOX;
                break;
            case ScaleMode.ZOOM:
                _scaleMode = ScaleMode.ZOOM;
                break;
            default:
                _scaleMode = ScaleMode.LETTERBOX;
                break;
        }
        
        // set scaleMode on the videoElement object
        if (videoPlayer.element)
            LayoutUtils.setLayoutAttributes(videoPlayer.element.metadata, scaleMode, RegistrationPoint.CENTER);
        
        invalidateSize();
        invalidateDisplayList();
