| Package | qnx.media |
| Class | public class VideoDisplay |
| Inheritance | VideoDisplay UIComponent flash.display.MovieClip |
VideoDisplay class represents the display area of video playback when using the MediaPlayer object.
See also
| Property | Defined 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 | ||
![]() | containment : String
Gets or sets a property that determines how a component is contained within a parent container. | UIComponent | |
![]() | size : Number
Gets or sets the size for this component (as a percentage of the
container's size, or in pixels). | UIComponent | |
![]() | sizeMode : String
Gets or sets the size mode for this component. | UIComponent | |
![]() | sizeUnit : String
Gets or sets the unit of measure for the size property. | 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 | ||
| Method | Defined By | ||
|---|---|---|---|
VideoDisplay(allowOverlay:Boolean = true, groupId:String = null)
Creates a VideoDisplay object. | VideoDisplay | ||
![]() | destroy():void
Call this method when you want to have your object collected by the garbage collector. | UIComponent | |
![]() | drawNow():void
Calls the draw() method. | UIComponent | |
![]() | invalidate(property:String, invalidateNow:Boolean = false):void
Marks the property as invalid and the draw() method is called on the next frame or the next render, whichever comes first. | UIComponent | |
![]() | setPosition(x:Number, y:Number):void
Sets the x and y position of the component. | UIComponent | |
![]() | setSize(w:Number, h:Number):void
Sets the width and height of the component. | UIComponent | |
| allowOverlay | property |
allowOverlay:BooleanGets 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.
public function get allowOverlay():Boolean public function set allowOverlay(value:Boolean):void| backgroundColor | property |
backgroundColor:uint
The background color of the VideoDisplay object.
public function get backgroundColor():uint public function set backgroundColor(value:uint):void| videoHeight | property |
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.
public function get videoHeight():uintSee also
| videoWidth | property |
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.
public function get videoWidth():uintSee also
| VideoDisplay | () | Constructor |
public function VideoDisplay(allowOverlay:Boolean = true, groupId:String = null)
Creates a VideoDisplay object.
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
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;