qnx.fuse.ui.media.VideoDisplay

VideoDisplay

Properties | Methods | Examples


Packageqnx.fuse.ui.media
Classpublic class VideoDisplay
InheritanceVideoDisplay Inheritance UIComponent Inheritance flash.display.MovieClip
Implements IVideoDisplay

The VideoDisplay class represents the display area of video playback when using the MediaPlayer object.

Class information:
PlayBook Tablet OS Version:   1.0.6

View the examples

See also

MediaControl



Public Properties

 PropertyDefined By
  allowOverlay : Boolean
Gets or sets the options that allow Flash content to appear on top of the video content.
VideoDisplay
  backgroundColor : uint
The background color of the VideoDisplay object.
VideoDisplay
 InheritedexplicitHeight : Number
[read-only] Returns the explicit height (actual height, in pixels) of the UI component.
UIComponent
 InheritedexplicitWidth : Number
[read-only] Returns the explicit width (actual width, in pixels) of the UI component.
UIComponent
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
 InheritedlayoutData : Object
Returns the layout data for the object.
UIComponent
 InheritedminHeight : Number
Gets or sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Gets or sets the minimum preferred width of the control.
UIComponent
  videoHeight : uint
[read-only] Returns the height of the video, or 0 if there is no video, no display was set, or the height has not been determined yet.
VideoDisplay
  videoWidth : uint
[read-only] Returns the width of the video, or 0 if there is no video, no display was set, or the width has not been determined yet.
VideoDisplay

Public Methods

 MethodDefined By
  
VideoDisplay(allowOverlay:Boolean = true, groupId:String = null)
Creates a VideoDisplay object.
VideoDisplay
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
UIComponent
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
Returns the size options for the given control.
UIComponent
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
This method calls doMeasure() in order to calculate the preferred size of the control.
UIComponent
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent

Protected Methods

 MethodDefined By
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
Performs a measurement on the control, and returns a LayoutMeasurement instance containing the available width and height within the layout.
UIComponent
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent

Property Detail

allowOverlay


allowOverlay:Boolean

Gets or sets the options that allow Flash content to appear on top of the video content.

If set to true the Flash content placed at the same area of the screen as the video will be visible, if false the Flash content will not be visible.


Implementation

public function get allowOverlay():Boolean
public function set allowOverlay(value:Boolean):void

backgroundColor


backgroundColor:uint

The background color of the VideoDisplay object.


Implementation

public function get backgroundColor():uint
public function set backgroundColor(value:uint):void

videoHeight


videoHeight:uint  [read-only]

Returns the height of the video, or 0 if there is no video, no display was set, or the height has not been determined yet.

The qnx.events.MediaPlayerEvent.INFO_CHANGE event can be used to provide a notification when the height is available.


Implementation

public function get videoHeight():uint

See also

MediaPlayerEvent

videoWidth


videoWidth:uint  [read-only]

Returns the width of the video, or 0 if there is no video, no display was set, or the width has not been determined yet.

The qnx.events.MediaPlayerEvent.INFO_CHANGE event can be used to provide a notification when the width is available.


Implementation

public function get videoWidth():uint

See also

MediaPlayerEvent

Constructor Detail

VideoDisplay()


public function VideoDisplay(allowOverlay:Boolean = true, groupId:String = null)

Creates a VideoDisplay object.

Parameters

allowOverlay:Boolean (default = true) — A Boolean indicating whether or not overlay is allowed. Overlay indicates whether or not other UI components can be displayed over top of the VideoDisplay instance. true to allow overlay, otherwise false.
groupId:String (default = null) — The group ID of the VideoDisplay.

See also

IowWindow

Examples

In the following example, VideoDisplay and MediaPlayer instances are created. The VideoDisplay instance is positioned and added to the stage. It is then associated with the MediaPlayer object using the videoDisplay property:

            _myVD = new VideoDisplay;
            _myVD.setPosition(1024/2 - 800/2, 600/2 - 480/2);
            _myVD.setSize(800, 480);
            _myVD.backgroundColor = 0x000000;
            addChild(_myVD);
            
            _myPlayer = new MediaPlayer();
            _myPlayer.addEventListener(MediaPlayerEvent.INFO_CHANGE, infoChange);            
            _myPlayer.url = "/accounts/1000/shared/videos/Vancouver City.mp4"            
            _myPlayer.videoDisplay = _myVD;