Transferred from the Adobe Open Source Subversion Repository
Transferred from the Adobe Open Source Subversion Repository

Revision: 12025
Author:   rfrishbe@adobe.com
Date:     2009-11-20T01:48:04.689786Z

Log Message: 
-----------
Switching out the old video component for the new video component that uses OSMF.  Also fixing RSL issue with OSMF because a change in flex-config.xml accidentally got overwritten.  Also fixing a bug caught during the last code review where you would set the volume on the VideoPlayer, but the volumeBar wouldn't be made aware of that change.

Switching out the video component results in *many* API changes.  The changes are highlighted below:

Class name changes:

 - spark.primitives.VideoElement is being renamed to spark.components.VideoDisplay
 - spark.components.mediaClasses.StreamingVideoSource is renamed to park.components.mediaClasses.DynamicStreamingVideoSource
 - spark.components.mediaClasses.StreamItem is renamed to park.components.mediaClasses.DynamicStreamingVideoItem



VideoDisplay/VideoPlayer event changes:

The new video component's events are: 
 - bytesLoadedChange : org.osmf.events.LoadEvent
 - currentTimeChange : org.osmf.events.TimeEvent
 - durationChange : org.osmf.events.TimeEvent
 - mediaPlayerStateChange : org.osmf.events.MediaPlayerStateChangeEvent

The old video component's events were:
 - close : spark.events.VideoEvent (removed)
 - complete : spark.events.VideoEvent (replaced with mediaPlayerStateChange)
 - metaDataReceived : spark.events.VideoEvent (replaced with mediaPlayerStateChange)
 - playheadUpdate : spark.events.VideoEvent (replaced with currentTimeChange)
 - progress : flash.events.ProgressEvent (replaced with bytesLoadedChange)
 - ready : spark.events.VideoEvent (replaced with mediaPlayerStateChange)



VideoDisplay/VideoPlayer property changes:

Renames:

 - maintainAspectRatio:Boolean has been renamed to scaleMode:String and rather than true/false, it now access 4 values: none, zoom, letterbox, and stretch.  See the enum class org.osmf.display.ScaleMode.
 - playheadTime:Number has been renamed to currentTime:Number
 - playWhenHidden has been renamed to pauseWhenHidden, and it's "tense" has been reversed.  So playWhenHidden = true correlates to pauseWhenHidden = false.  Also, before we would only pause when the video component was explcitly set to visible=false, but now we detect if the video components or any of it's ancestors have been hidden.
 - totalTime:Number has been renamed to duration:Number

New properties:

 - bytesLoaded:Number This is a new property not available on the old video component
 - bytesTotal:Number This is a new property not available on the old video component
 - loop: Boolean this was a property added a while ago on the old video component but not in the original video player spec
 - mediaPlayerState: this is a new property that details the state of the video component.  See org.osmf.media.MediaPlayerState for all the possible values.
 - seekToFirstFrame:Boolean (pending PARB approval) - This is a new property available on VideoDisplay/VideoPlayer.  When autoPlay = false, if seekToFirstFrame is set to true, then we will connect to the server to start downloading the video, figure out the size of the video and resize appropriately, and show the first frame of the video.  If seekToFirstFrame is false, then no connection to the server is made, there's no implicit size for this video, and the first frame will not be show automatically.  By default the value of this property is true.  In the old video component, when autoPlay = false, we always has the same behavior as seekToFirstFrame = true.  Now it is controllable through this property.  Eventually, (not for Flex 4.0), we will most-likely have support for a thumbnail source or a splash screen so the video's preview will show up without making an unneeded connection to the server.  The property name may change depending on PARB.

Other changes:

 - autoRewind: The default of autoRewind is now true instead of false
 - enabled: before we paused the video when the video component was explicitly set to enabled = false.  Now we pause the video when the video component or any of it's ancestors have been disabled.



VideoPlayer-only changes:

 - videoObject:flash.media.Video property is now a new property on VideoPlayer.  It was previously only on VideoDisplay.
 - The skin states for the old VideoPlayer were: connectionError, disabled, disconnected, loading, playing, stopped, connectionErrorAndFullScreen, disabledAndFullScreen, disconnectedAndFullScreen, loadingAndFullScreen, playingAndFullScreen, stoppedAndFullScreen.  The new skin states are: uninitialized, loading, ready, playing, paused, buffering, playbackError, disabled, uninitializedAndFullScreen, loadingAndFullScreen, readyAndFullScreen, playingAndFullScreen, pausedAndFullScreen, bufferingAndFullScreen, playbackErrorAndFullScreen, disabledAndFullScreen 



DynamicStreamingVideoItem property changes:

 - bitRate:Number renamed to bitrate:Number



DynamicStreamingVideoSource property changes:

 - initialIndex has been added to DynamicSteramingVideoSource
 - live:Boolean has changed to streamType:String which accepts values: live, recorded, any.  See the enum class org.osmf.net.StreamType for more info.
 - serverURI:String renamed to host:Object
 - streamItems:Array has changed types to streamItems:Vector.<DynamicStreamingVideoItem>



ScrubBar property changes (THESE CHANGES ARE NOT DONE YET, BUT SHOULD BE DONE SOON)

 - bufferedStart will be removed
 - bufferedEnd will be renamed to loadedRangeEnd.  This property name still may change depending on PARB.
 - bufferedArea skin part needs to be renamed.  Probably will be renamed to loadedArea.  PARB still deciding.


QE notes: -
Doc notes: -
Bugs: -
Reviewer: Kevin
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamItem.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/flex-config.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/build.xml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer2.as" copyfrom-rev="12005" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin2.mxml" copyfrom-rev="12005" action="R">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer2.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin2.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerSkin.mxml</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1290783 13f79535-47bb-0310-9956-ffa450edef68

shyamalschandra/flex-sdk,shyamalschandra/flex-sdk,apache/flex-sdk,SlavaRa/flex-sdk,apache/flex-sdk,SlavaRa/flex-sdk,apache/flex-sdk,danteinforno/flex-sdk,SlavaRa/flex-sdk,danteinforno/flex-sdk,apache/flex-sdk,adufilie/flex-sdk,SlavaRa/flex-sdk,danteinforno/flex-sdk,shyamalschandra/flex-sdk,apache/flex-sdk,shyamalschandra/flex-sdk,shyamalschandra/flex-sdk,adufilie/flex-sdk,adufilie/flex-sdk,danteinforno/flex-sdk,danteinforno/flex-sdk,apache/flex-sdk,adufilie/flex-sdk,shyamalschandra/flex-sdk,SlavaRa/flex-sdk,SlavaRa/flex-sdk,adufilie/flex-sdk,adufilie/flex-sdk,danteinforno/flex-sdk