0 Replies Latest reply on Nov 19, 2009 5:48 PM by rfrishbe

    [svn:fx-trunk] 12025: Switching out the old video component for the new video component that uses OSMF .

    rfrishbe Level 3

      Revision: 12025

      Revision: 12025

      Author:   rfrishbe@adobe.com

      Date:     2009-11-19 17:48:04 -0800 (Thu, 19 Nov 2009)

      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.

       

       

       

      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:

      **************

          flex/sdk/trunk/frameworks/flex-config.xml

          flex/sdk/trunk/frameworks/projects/spark/defaults.css

          flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as

          flex/sdk/trunk/frameworks/projects/wireframe/build.xml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerSkin.mx ml

          flex/sdk/trunk/frameworks/spark-manifest.xml

       

      Added Paths:

      ***********

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin.mxml

       

      Removed Paths:

      *************

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer2.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamItem.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamingVideo Source.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.png

          flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin.mxml

          flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin2.mxml