Package | com.akamai.stagevideo |
Class | public class StageVideoHelper |
Inheritance | StageVideoHelper flash.events.EventDispatcher |
This class is designed to help with setting up and using Flash Player 10.2 StageVideo technology with a fallback to the Video Object if StageVideo is not available on the end user's system
With stage video, the StageVideo object does not sit inside the Flash Player display list but sits behind the stage instead.
IMPORTANT NOTES ABOUT USING STAGE VIDEOProperty | Defined By | ||
---|---|---|---|
height : Number
Accessor for the height property set on both StageVideo and Video objects. | StageVideoHelper | ||
stageVideo : Object [read-only]
Accessor to get the stageVideo object
| StageVideoHelper | ||
stageVideoUsed : Boolean [read-only]
Accessor to get the current boolean value of stageVideoUsed. | StageVideoHelper | ||
status : String [read-only]
Accessor to get the current status that is active. | StageVideoHelper | ||
video : Video [read-only]
Accessor to get the Video object
| StageVideoHelper | ||
videoCompositingStatus : String [read-only]
Accessor to get the current video compositing that is active. | StageVideoHelper | ||
videoDecodingStatus : String [read-only]
Accessor to get the current video decoding that is active. | StageVideoHelper | ||
videoHeight : uint [read-only]
Accessor to get the Video objects or the StageVideo objects videoHeight property
| StageVideoHelper | ||
videoWidth : uint [read-only]
Accessor to get the Video objects or the StageVideo objects videoWidth property
| StageVideoHelper | ||
visible : Boolean
Accessor for the visible property set on the video object only. | StageVideoHelper | ||
width : Number
Accessor for the width property set on both StageVideo and Video objects. | StageVideoHelper | ||
x : Number
Accessor for the x property set on both StageVideo and Video objects. | StageVideoHelper | ||
y : Number
Accessor for the y property set on both StageVideo and Video objects. | StageVideoHelper |
Method | Defined By | ||
---|---|---|---|
StageVideoHelper(stage:Stage, rect:Rectangle, displayObjectContainer:DisplayObjectContainer = null)
Constructor.
| StageVideoHelper | ||
attachNetStream(netStream:NetStream):void | StageVideoHelper | ||
focus():void
Sets focus to the desired StageVideoHelper class since multiple instances can be instantianted and are stored in a static vector across all instances. | StageVideoHelper | ||
gotoToFullScreen(player:Object, videoContainer:Object, usingFlex:Boolean = false, hidePlayer:Boolean = true):void
This method will find largest size that preserves aspect ratio of screen and create a fullScreenSourceRect at that size and put the stage into fullscreen mode. | StageVideoHelper | ||
release():void
Releases the current StageVideoHelper class that has focus. | StageVideoHelper |
Constant | Defined By | ||
---|---|---|---|
NETSTREAM_RENDER : String = render [static]
| StageVideoHelper | ||
RENDER_STATE : String = renderState [static]
| StageVideoHelper | ||
STAGE_VIDEO_AVAILABILITY : String = stageVideoAvailability [static]
| StageVideoHelper | ||
STATUS_STAGEVIDEO_ACCELERATED : String = StageVideo accelerated [static]
Status type
| StageVideoHelper | ||
STATUS_STAGEVIDEO_SOFTWARE : String = StageVideo software [static]
Status type
| StageVideoHelper | ||
STATUS_VIDEO_ACCELERATED : String = Video accelerated [static]
Status type
| StageVideoHelper | ||
STATUS_VIDEO_SOFTWARE : String = Video software [static]
Status type
| StageVideoHelper |
height | property |
height:Number
Accessor for the height property set on both StageVideo and Video objects. Default value is 240 pixels
public function get height():Number
public function set height(value:Number):void
stageVideo | property |
stageVideo:Object
[read-only] Accessor to get the stageVideo object
public function get stageVideo():Object
stageVideoUsed | property |
stageVideoUsed:Boolean
[read-only] Accessor to get the current boolean value of stageVideoUsed.
public function get stageVideoUsed():Boolean
status | property |
status:String
[read-only] Accessor to get the current status that is active. Possible String values that can be returned are
public function get status():String
video | property |
video:Video
[read-only] Accessor to get the Video object
public function get video():Video
videoCompositingStatus | property |
videoCompositingStatus:String
[read-only] Accessor to get the current video compositing that is active. Possible String values that can be returned are:
public function get videoCompositingStatus():String
videoDecodingStatus | property |
videoDecodingStatus:String
[read-only] Accessor to get the current video decoding that is active. Possible String values that can be returned are:
public function get videoDecodingStatus():String
videoHeight | property |
videoHeight:uint
[read-only] Accessor to get the Video objects or the StageVideo objects videoHeight property
public function get videoHeight():uint
videoWidth | property |
videoWidth:uint
[read-only] Accessor to get the Video objects or the StageVideo objects videoWidth property
public function get videoWidth():uint
visible | property |
visible:Boolean
Accessor for the visible property set on the video object only. If the StageVideo object is being used then the Video object visible property gets set to false automaticlly. Default value is true
public function get visible():Boolean
public function set visible(value:Boolean):void
width | property |
width:Number
Accessor for the width property set on both StageVideo and Video objects. Default value is 320 pixels
public function get width():Number
public function set width(value:Number):void
x | property |
x:Number
Accessor for the x property set on both StageVideo and Video objects. Default value is 0 pixels
public function get x():Number
public function set x(value:Number):void
y | property |
y:Number
Accessor for the y property set on both StageVideo and Video objects. Default value is 0 pixels
public function get y():Number
public function set y(value:Number):void
StageVideoHelper | () | Constructor |
public function StageVideoHelper(stage:Stage, rect:Rectangle, displayObjectContainer:DisplayObjectContainer = null)
Constructor.
Parametersstage:Stage — Reference to a Stage object for access to stage properties and to add event listeners and children to the display list of the stage.
| |
rect:Rectangle — Rectangle object to define the x, y, width, and height of the Video or StageVideo object.
| |
displayObjectContainer:DisplayObjectContainer (default = null ) — Default value is null. Optional parameter, if supplied the Video object will be added as a child of DisplayObjectContainer,
otherwise the Video object will be added as a child of the stage parameter supplied.
|
attachNetStream | () | method |
public function attachNetStream(netStream:NetStream):void
Parameters
netStream:NetStream — Instance of a NetStream object to be attached the Video or the StageVideo object in this class
|
focus | () | method |
public function focus():void
Sets focus to the desired StageVideoHelper class since multiple instances can be instantianted and are stored in a static vector across all instances. This method will set the view port on all instnaces and set the focus menber variable to "this" instance of the StageVideoHelper class.
gotoToFullScreen | () | method |
public function gotoToFullScreen(player:Object, videoContainer:Object, usingFlex:Boolean = false, hidePlayer:Boolean = true):void
This method will find largest size that preserves aspect ratio of screen and create a fullScreenSourceRect at that size and put the stage into fullscreen mode. It will also take the Video object out of the displayObjectContainer if the displayObjectContainer is not null and add it to the player object at the highest display list index.
Parameters
player:Object —
| |
videoContainer:Object — This method will simply store this DisplayObject for use when exiting fullscreen mode by the FullScreenEvent.FULL_SCREEN event listener handler.
If a displayObjectContainer has been defined in the constructor AND the Video Object is in use, NOT the StageVideo object, the Video object will be added back to the
displayObjectContainer upon exiting of fullscreen mode
| |
usingFlex:Boolean (default = false ) — Set to true if you are using MXML visual elements so that addElement is called instead of addChild
| |
hidePlayer:Boolean (default = true )
|
release | () | method |
public function release():void
Releases the current StageVideoHelper class that has focus. If there is more than one instance being stored in the static instances vector it will look for the instance that matches "this" and remove it from the vector and release for garbage collection.
NETSTREAM_RENDER | Constant |
public static const NETSTREAM_RENDER:String = render
RENDER_STATE | Constant |
public static const RENDER_STATE:String = renderState
STAGE_VIDEO_AVAILABILITY | Constant |
public static const STAGE_VIDEO_AVAILABILITY:String = stageVideoAvailability
STATUS_STAGEVIDEO_ACCELERATED | Constant |
public static const STATUS_STAGEVIDEO_ACCELERATED:String = StageVideo accelerated
Status type
STATUS_STAGEVIDEO_SOFTWARE | Constant |
public static const STATUS_STAGEVIDEO_SOFTWARE:String = StageVideo software
Status type
STATUS_VIDEO_ACCELERATED | Constant |
public static const STATUS_VIDEO_ACCELERATED:String = Video accelerated
Status type
STATUS_VIDEO_SOFTWARE | Constant |
public static const STATUS_VIDEO_SOFTWARE:String = Video software
Status type