Package | com.brightcove.api.modules |
Class | public class VideoPlayerModule |
Inheritance | VideoPlayerModule ![]() ![]() |
Subclasses | ChromelessVideoPlayer |
Method | Defined By | ||
---|---|---|---|
VideoPlayerModule(module:Object)
Constructor. | VideoPlayerModule | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void [override]
Adds a listener for an event. | APIModule | |
cueVideo(id:Object, property:String = id):Boolean
Loads a video in the video window without playing it. | VideoPlayerModule | ||
enableInitialBandwidthDetection(enable:Boolean = true):void
Enables/disables initial bandwidth detection for streaming videos, allowing for faster startup. | VideoPlayerModule | ||
getAlpha():Number
Returns the alpha value of the component. | VideoPlayerModule | ||
getBackBufferCapacity():Number
Returns the current maximum capacity for the back buffer. | VideoPlayerModule | ||
getBackBufferLength():Number
Returns the amount of seconds of cached video available preceding the current playhead position. | VideoPlayerModule | ||
getBlendMode():String
Returns the blend mode of the component. | VideoPlayerModule | ||
getBufferCapacity():Number
Returns the current maximum capacity for the buffer. | VideoPlayerModule | ||
getBufferLength():Number
Returns the number of seconds of cached video available to the player beyond the current playhead position. | VideoPlayerModule | ||
Returns the interface for the layout container of the element. | VideoPlayerModule | ||
getContentTypeDisplayed():String
Returns whether an ad or video content are playing. | VideoPlayerModule | ||
getCSS():String
Returns the CSS used for this component instance. | VideoPlayerModule | ||
getCurrentBandwidth():Number
Gets the current bandwidth measurement. | VideoPlayerModule | ||
getCurrentDisplayHeight():Number
Returns the height of the available display area for videos. | VideoPlayerModule | ||
getCurrentDisplayWidth():Number
Returns the width of the available display area for videos. | VideoPlayerModule | ||
getCurrentDisplayX():Number
Returns the x-coordinate for the location of the video display area
relative to the global origin. | VideoPlayerModule | ||
getCurrentDisplayY():Number
Returns the y-coordinate for the location of the video display area
relative to the global origin. | VideoPlayerModule | ||
getCurrentFrameRate():Number
Gets the current frame rate for playback. | VideoPlayerModule | ||
Returns the rendition DTO for the rendition of the video currently in the video window. | VideoPlayerModule | ||
Returns the video DTO for the video currently in the video window. | VideoPlayerModule | ||
getCurrentVideoHeight():Number
Returns the height of the actual video content as rendered. | VideoPlayerModule | ||
getCurrentVideoWidth():Number
Returns the width of the actual video content as rendered. | VideoPlayerModule | ||
getDefaultBufferTime():uint
Returns the default buffer time in seconds that will be set on new stream instances. | VideoPlayerModule | ||
getDefinition():String
Returns the XML definition for the element. | VideoPlayerModule | ||
getDisplayHeight():Number
Returns the pixel height of the video display. | VideoPlayerModule | ||
getDisplayWidth():Number
Returns the pixel width of the video display. | VideoPlayerModule | ||
getEnabled():Boolean
Returns whether component is enabled. | VideoPlayerModule | ||
getHeight():Number
Returns the pixel height of the component. | VideoPlayerModule | ||
getID():String
Returns the ID of the element as set from the markup. | VideoPlayerModule | ||
getIndex():int
Returns the index of this element in its parent's elements array. | VideoPlayerModule | ||
getInitialBandwidthDetectionEnabled():Boolean
Returns whether initial bandwidth detection for streaming has been enabled. | VideoPlayerModule | ||
getMediaControllerProperty(pProperty:String):Object
Returns a property from the media controller currently being used. | VideoPlayerModule | ||
Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array. | VideoPlayerModule | ||
Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array. | VideoPlayerModule | ||
getPrivacyMode():Boolean
Gets the current state of privacy mode (which is either set through the embed code
or via an API). | VideoPlayerModule | ||
getRotation():Number
Returns the rotation of the component. | VideoPlayerModule | ||
getVideoBytesLoaded():Number
For progressively downloaded video, returns the total number of bytes currently loaded for the video. | VideoPlayerModule | ||
getVideoBytesTotal():Number
For progressively downloaded video, returns the total number of bytes for the current video. | VideoPlayerModule | ||
getVideoDuration(format:Boolean = false):Object
Returns the time duration of the currently playing video. | VideoPlayerModule | ||
getVideoPosition(format:Boolean = false):Object
Returns the time position of the currently playing video. | VideoPlayerModule | ||
getVisible():Boolean
Returns whether the component is visible. | VideoPlayerModule | ||
getVolume():Number
Returns the current volume in the player. | VideoPlayerModule | ||
getWidth():Number
Returns the pixel width of the component. | VideoPlayerModule | ||
getX(global:Boolean = false):Number
Returns the position of the component on the x axis. | VideoPlayerModule | ||
getY(global:Boolean = false):Number
Returns the position of the component on the y axis. | VideoPlayerModule | ||
goFullScreen(fullScreen:Boolean = true):void
Sets the display mode for the player, fullscreen or default. | VideoPlayerModule | ||
isMuted():Boolean
Returns whether the video player currently is muted. | VideoPlayerModule | ||
isPlayerDefined():Boolean
Returns whether the video player is defined for the player instance. | VideoPlayerModule | ||
isPlaying():Boolean
Returns whether the video currently displayed in the video window is playing. | VideoPlayerModule | ||
loadVideo(id:Object, property:String = id, mode:String = full):Boolean
Plays a video in the video window. | VideoPlayerModule | ||
mediaIsLive():Boolean
Returns whether the current media loaded is live (true) or on demand (false). | VideoPlayerModule | ||
move(x:Number, y:Number, global:Boolean = false):void
Positions the element within the experience. | VideoPlayerModule | ||
mute(mute:Boolean = true):void
Mutes or unmutes the sound in the player. | VideoPlayerModule | ||
overlay():Sprite
Returns an Sprite that overlays the video display area. | VideoPlayerModule | ||
pause(pause:Boolean = true):void
Pauses or resumes playback of the current title in the video window. | VideoPlayerModule | ||
play():void
Starts playback of the current title in the video window. | VideoPlayerModule | ||
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void [override]
Removes a listener for an event. | APIModule | |
removeUserMessage():void
Removes the user message dialog, if present. | VideoPlayerModule | ||
requestRenditionChange():void
Forces the rendition selection algorithm to run, potentially changing the currently playing rendition. | VideoPlayerModule | ||
seek(time:Number):void
Seeks to a specified time position in the video. | VideoPlayerModule | ||
setAlpha(alpha:Number):void
Sets the alpha value of the component. | VideoPlayerModule | ||
setBackBufferCapacity(pTime:uint):void
Sets the desired maximum capacity of the back buffer. | VideoPlayerModule | ||
setBitRateRange(min:int, max:Number):Object
Sets the minimum and maximum available renditions. | VideoPlayerModule | ||
setBlendMode(mode:String):void
Sets the blend mode of the component. | VideoPlayerModule | ||
setBufferCapacity(pTime:uint):void
Sets the desired maximum capacity of the buffer. | VideoPlayerModule | ||
setConnectOnLoad(connect:Boolean):void
Sets whether for a streaming video the player should connect to FMS on load in order
to determine user bandwidth or whether the connection should be delayed until playback
is requested by the user. | VideoPlayerModule | ||
setDefaultBufferTime(time:uint):void
Sets the default buffer time in seconds that will be set on new stream instances. | VideoPlayerModule | ||
setEnabled(enable:Boolean):void
Enables/disables component for events. | VideoPlayerModule | ||
setPrivacyMode(pMode:Boolean):void
Sets the current state of privacy mode (which is either set through the embed code
or via an API). | VideoPlayerModule | ||
setRenditionSelectionCallback(callback:Function):void
Sets callback for dynamic delivery determination so that developer can set
which renditions play when the player changes size or the video buffer, or
on initial playback. | VideoPlayerModule | ||
setRotation(rotation:Number):void
Sets the rotation of the component. | VideoPlayerModule | ||
setSize(width:Number, height:Number):void
Sets the pixel dimensions of the element. | VideoPlayerModule | ||
setStyles(styles:String):void
Overrides specific styles for a component by accepting a semicolon-delimited list of style names and colors. | VideoPlayerModule | ||
setVideoFilter(filter:Object):void
Applies a bitmap video filter to the video currently loaded. | VideoPlayerModule | ||
setVisible(visible:Boolean):void
Sets whether the component is visible. | VideoPlayerModule | ||
setVolume(volume:Number):void
Sets the volume for video playback in the player. | VideoPlayerModule | ||
showVolumeControls(show:Boolean = true):void
Opens or closes the volume controls over the video screen, depending on the argument passed in. | VideoPlayerModule | ||
stop():void
Stops playback of the current title in the video window, sending its position to the start. | VideoPlayerModule | ||
toggleMenuPage(page:String, media:Object = null):void
Toggles Brightcove menu, opening to specified page with data displayed for the media passed in, or closing menu if page is displayed for the same media. | VideoPlayerModule | ||
toggleVolumeControls():void
Toggles the volume controls opened and closed. | VideoPlayerModule |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when media playback first begins. | VideoPlayerModule | |||
Dispatched when a buffering window begins for the current media, pausing playback. | VideoPlayerModule | |||
Dispatched when media finishes a buffering window. | VideoPlayerModule | |||
Dispatched when new media has been loaded or cued in the player. | VideoPlayerModule | |||
Dispatched when the current media completes. | VideoPlayerModule | |||
Dispatched when there is an onEdge event dispatched by the NetStream object. | VideoPlayerModule | |||
Dispatched when there is an error connecting to or playing the current media. | VideoPlayerModule | |||
Dispatched when media's audio is muted or unmuted. | VideoPlayerModule | |||
Dispatched when media begins or resumes playback. | VideoPlayerModule | |||
Dispatched as media is played back. | VideoPlayerModule | |||
Dispatched when the transition to a new rendition is completed. | VideoPlayerModule | |||
Dispatched when a new rendition of the current media is requested. | VideoPlayerModule | |||
Dispatched when media is requested to be sent to a new position. | VideoPlayerModule | |||
Dispatched when media has completed being sent to a new position. | VideoPlayerModule | |||
Dispatched when media is paused or stopped. | VideoPlayerModule | |||
Dispatched when the volume in the player is changed. | VideoPlayerModule |
Constant | Defined By | ||
---|---|---|---|
CONTENT_TYPE_AD : String = ad [static] | VideoPlayerModule | ||
CONTENT_TYPE_BUMPER : String = bumper [static] | VideoPlayerModule | ||
CONTENT_TYPE_VIDEO : String = video [static] | VideoPlayerModule |
VideoPlayerModule | () | Constructor |
public function VideoPlayerModule(module:Object)
Constructor.
Parametersmodule:Object — module to wrap with this API class.
|
cueVideo | () | method |
public function cueVideo(id:Object, property:String = id):Boolean
Loads a video in the video window without playing it. If the video is not already loaded into the player, it will be fetched from the server.
Parameters
id:Object — ID or referenceID of the title to be cued.
| |
property:String (default = id ) — the value passed as the first param is an ID or referenceID
(ContentModule.ID |ContentModule.REFERENCE_ID ).
|
Boolean — True if the video is in the player and cued.
|
enableInitialBandwidthDetection | () | method |
public function enableInitialBandwidthDetection(enable:Boolean = true):void
Enables/disables initial bandwidth detection for streaming videos, allowing for faster startup. When disabled, a bufferTime of 5 seconds will be used. This buffer may be modified through the setDefaultBufferTime() method. This is for streaming content only. See the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method
Parameters
enable:Boolean (default = true ) — true to enable initial bandwidth detection, false to disable.
|
getAlpha | () | method |
public function getAlpha():Number
Returns the alpha value of the component.
ReturnsNumber — The alpha value of the component.
|
getBackBufferCapacity | () | method |
public function getBackBufferCapacity():Number
Returns the current maximum capacity for the back buffer. The back buffer allows the player to store video content as it is played. This provides similiar features to the forward buffer, but in a playbar region behind the playhead. For streaming content this capacity acts as an upper limit on the amount of seconds of video that can be stored in the back buffer. These buffered seconds are cached video content behind the current playhead position. For progressive download content this capacity will not limit the amount seconds stored in back buffer as progressive download content retains all downloaded data. Akamai HD content will not be affected by the use of this method, the return will be the default value. However, Akamai may be using their own value which may differ. For more information on buffering please see the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method.
ReturnsNumber — Maximum capacity of the back buffer in seconds.
|
getBackBufferLength | () | method |
public function getBackBufferLength():Number
Returns the amount of seconds of cached video available preceding the current playhead position. The back buffer allows the player to store video content as it is played. This provides similiar features to the forward buffer, but in a playbar region behind the playhead. This is available for both streaming and progressive download content as well as for HD content. In the case of streaming content, this value will be limited by the back buffer capacity which can be set using setBackBufferCapacity(value). In the case of progressive download content, this value will based off of the current position of the playhead as progressive download retains the video data it downloads, and must download from start to finish. In the case of Akamai HD content, this value will be limited by Akamai buffering algorithms. For more information on buffering please see the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method. Also see, Adobe back buffer length documents
ReturnsNumber — The number of seconds stored in the back buffer.
|
getBlendMode | () | method |
public function getBlendMode():String
Returns the blend mode of the component.
ReturnsString — The blend mode of the component.
|
getBufferCapacity | () | method |
public function getBufferCapacity():Number
Returns the current maximum capacity for the buffer. The buffer allows the player to store video content ahead of the current playhead position to allow for smoother playback. For streaming content this capacity acts as an upper limit on the amount of seconds of video that can be stored in the buffer. These buffered seconds are cached video content ahead of the current playhead position. For progressive download content this capacity will not limit the rate or amount it downloads as progressive download content will attempt to download the entire file regardless. Akamai HD content will not be affected by the use of this method, the return will be the default value. However, Akamai may be using their own value which may differ. For more information on buffering please see the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method.
ReturnsNumber — Maximum capacity of the buffer in seconds.
|
getBufferLength | () | method |
public function getBufferLength():Number
Returns the number of seconds of cached video available to the player beyond the current playhead position. The buffer allows the player to store video content ahead of the current playhead position to allow for smoother playback. This is available for both streaming and progressive download content as well as for HD content. For streaming content this value will have an upper limit based on the buffer capacity, set through setBufferCapacity(value). If not set, this upper limit defaults to 60 seconds. For Akamai HD content this value will be limited by Akamai buffering algorithms. For progressive download content this value has no upper limit short of the end of the video as progressive download will attempt to download and store the entire video asset. For more information on buffering please see the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method. Also see, Adobe buffer length documents
ReturnsNumber — The number of seconds currently in the buffer.
|
getContainer | () | method |
public function getContainer():LayoutBox
Returns the interface for the layout container of the element.
ReturnsLayoutBox — The interface for the layout container for the layout element.
|
getContentTypeDisplayed | () | method |
public function getContentTypeDisplayed():String
Returns whether an ad or video content are playing.
ReturnsString — "ad" if a video ad is playing, else "video". Overlays will NOT return "ad".
|
getCSS | () | method |
public function getCSS():String
Returns the CSS used for this component instance.
ReturnsString — The CSS (as a String) used for this component instance.
|
getCurrentBandwidth | () | method |
public function getCurrentBandwidth():Number
Gets the current bandwidth measurement. If called before initial playback this may return 0, depending on whether there is a value from the player's measurements. In the case where bandwidth detection is not overridden externally this value is used to gauge which rendition to select the appropriate rendition.
ReturnsNumber — Bandwidth estimation calculated in kbps.
|
getCurrentDisplayHeight | () | method |
public function getCurrentDisplayHeight():Number
Returns the height of the available display area for videos. If the aspect ratio of the display does not match the videos, this number may be different from getCurrentVideoHeight(). When interpreting this value, be sure to account for player resizings currently in-progress. For instance, it may be necessary to wait for the next Event.ENTER_FRAME to determine the final video size while the player is entering or exiting fullscreen mode.
ReturnsNumber |
getCurrentDisplayWidth | () | method |
public function getCurrentDisplayWidth():Number
Returns the width of the available display area for videos. If the aspect ratio of the display does not match the videos, this number may be different from getCurrentVideoWidth(). When interpreting this value, be sure to account for player resizings currently in-progress. For instance, it may be necessary to wait for the next Event.ENTER_FRAME to determine the final video size while the player is entering or exiting fullscreen mode.
ReturnsNumber |
getCurrentDisplayX | () | method |
public function getCurrentDisplayX():Number
Returns the x-coordinate for the location of the video display area relative to the global origin.
ReturnsNumber — the x-coordinate for the location of the video display area
relative to the global origin.
|
getCurrentDisplayY | () | method |
public function getCurrentDisplayY():Number
Returns the y-coordinate for the location of the video display area relative to the global origin.
ReturnsNumber — the y-coordinate for the location of the video display area
relative to the global origin.
|
getCurrentFrameRate | () | method |
public function getCurrentFrameRate():Number
Gets the current frame rate for playback. If this is an AkamaiHD stream this value is derived from their library, if it is an FMS stream it is taken from Adobe's NetStream.
ReturnsNumber — Current frame rate calculated in frames per second.
|
getCurrentRendition | () | method |
public function getCurrentRendition():RenditionAssetDTO
Returns the rendition DTO for the rendition of the video currently in the video window. If the video playing back has not been enabled for renditions then null will be returned (a non-multibitrate video has 0 renditions associated with it).
ReturnsRenditionAssetDTO — The rendition DTO or null if the current video is not enabled for renditions.
|
getCurrentVideo | () | method |
public function getCurrentVideo():VideoDTO
Returns the video DTO for the video currently in the video window. Download the example code in the article, Displaying DFXP Captions for a Video to see a code example of this method.
ReturnsVideoDTO — A video DTO.
|
getCurrentVideoHeight | () | method |
public function getCurrentVideoHeight():Number
Returns the height of the actual video content as rendered. If the aspect ratio of the display does not match the videos, this number may be different from getCurrentDisplayHeight(). When interpreting this value, be sure to account for player resizings currently in-progress. For instance, it may be necessary to wait for the next Event.ENTER_FRAME to determine the final video size while the player is entering or exiting fullscreen mode.
ReturnsNumber |
getCurrentVideoWidth | () | method |
public function getCurrentVideoWidth():Number
Returns the width of the actual video content as rendered. If the aspect ratio of the display does not match the videos, this number may be different from getCurrentDisplayWidth(). When interpreting this value, be sure to account for player resizings currently in-progress. For instance, it may be necessary to wait for the next Event.ENTER_FRAME to determine the final video size while the player is entering or exiting fullscreen mode.
ReturnsNumber |
getDefaultBufferTime | () | method |
public function getDefaultBufferTime():uint
Returns the default buffer time in seconds that will be set on new stream instances. This is for streaming content only.
Returnsuint — The default buffer time in seconds that will be set on new stream instances.
|
getDefinition | () | method |
public function getDefinition():String
Returns the XML definition for the element.
ReturnsString — The XML definition for the element as a string.
|
getDisplayHeight | () | method |
public function getDisplayHeight():Number
Returns the pixel height of the video display.
ReturnsNumber — The pixel height of the video display.
|
getDisplayWidth | () | method |
public function getDisplayWidth():Number
Returns the pixel width of the video display.
ReturnsNumber — The pixel width of the video display.
|
getEnabled | () | method |
public function getEnabled():Boolean
Returns whether component is enabled.
ReturnsBoolean — Boolean value showing whether component is enabled.
|
getHeight | () | method |
public function getHeight():Number
Returns the pixel height of the component.
ReturnsNumber — The pixel height of the component.
|
getID | () | method |
public function getID():String
Returns the ID of the element as set from the markup.
ReturnsString — The string ID of the element.
|
getIndex | () | method |
public function getIndex():int
Returns the index of this element in its parent's elements array.
Returnsint — The index of this element in its parent's elements array.
|
getInitialBandwidthDetectionEnabled | () | method |
public function getInitialBandwidthDetectionEnabled():Boolean
Returns whether initial bandwidth detection for streaming has been enabled. This is for streaming content only.
ReturnsBoolean |
getMediaControllerProperty | () | method |
public function getMediaControllerProperty(pProperty:String):Object
Returns a property from the media controller currently being used. This can be used to read properties from controllers such as Akamai HDCore, that are not exposed through the APIs elsewhere. Only properties of type number (Number/int/uint), boolean (Boolean) or string (String) will be returned.
Parameters
pProperty:String — Name of property to read from media controller library
|
Object |
getNextSibling | () | method |
public function getNextSibling():Component
Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array.
ReturnsComponent — The interface for the next sibling layout element.
|
getPreviousSibling | () | method |
public function getPreviousSibling():Component
Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array.
ReturnsComponent — The interface for the previous sibling layout element.
|
getPrivacyMode | () | method |
public function getPrivacyMode():Boolean
Gets the current state of privacy mode (which is either set through the embed code or via an API). If true Akamai Media Analytics will be disabled, and the initial bandwidth detection cookie has been disabled and deleted. Otherwise publisher account settings will be used for this feature.
ReturnsBoolean — True if enabled, indicating that all services that use tracking cookies will be disabled,
false otherwise in which case the publisher's account settings will be used to determine whether these
services are enabled or disabled.
|
getRotation | () | method |
public function getRotation():Number
Returns the rotation of the component.
ReturnsNumber — The rotation of the component in degrees.
|
getVideoBytesLoaded | () | method |
public function getVideoBytesLoaded():Number
For progressively downloaded video, returns the total number of bytes currently loaded for the video. This can be used to offer the user feedback about download progress.
ReturnsNumber — The total number of bytes downloaded to the client for the current video.
|
getVideoBytesTotal | () | method |
public function getVideoBytesTotal():Number
For progressively downloaded video, returns the total number of bytes for the current video. This can be used to offer the user feedback about download progress.
ReturnsNumber — The size of the current video in number of bytes.
|
getVideoDuration | () | method |
public function getVideoDuration(format:Boolean = false):Object
Returns the time duration of the currently playing video. If a linear ad is currently playing, this will return the duration for the ad.
Parameters
format:Boolean (default = false ) — true, returns a formatted time string (12:34), else returns number of seconds.
|
Object — Either the duration in the media in seconds or a string formatted timecode.
|
getVideoPosition | () | method |
public function getVideoPosition(format:Boolean = false):Object
Returns the time position of the currently playing video. If a linear ad is currently playing, this will return the position for the ad.
Parameters
format:Boolean (default = false ) — true, returns a formatted time string (12:34), else returns number of seconds.
|
Object — Either the position in the media in seconds or a string formatted timecode.
|
getVisible | () | method |
public function getVisible():Boolean
Returns whether the component is visible.
ReturnsBoolean — Boolean value showing whether component is visible.
|
getVolume | () | method |
public function getVolume():Number
Returns the current volume in the player. If a linear ad is currently playing, this get the volume of the ad.
ReturnsNumber — The current volume level of the player.
|
getWidth | () | method |
public function getWidth():Number
Returns the pixel width of the component.
ReturnsNumber — The pixel width of the component.
|
getX | () | method |
public function getX(global:Boolean = false):Number
Returns the position of the component on the x axis.
Parameters
global:Boolean (default = false ) — Whether to return the x position on the stage,
not relative to the component container.
|
Number — The position of the component on the x axis.
|
getY | () | method |
public function getY(global:Boolean = false):Number
Returns the position of the component on the y axis.
Parameters
global:Boolean (default = false ) — Whether to return the y position on the stage,
not relative to the component container.
|
Number — The position of the component on the y axis.
|
goFullScreen | () | method |
public function goFullScreen(fullScreen:Boolean = true):void
Sets the display mode for the player, fullscreen or default. Due to the restrictions of the Flash Player security, this method is only available through the ActionScript API, and only when initiated by user action (e.g., a button click).
Parameters
fullScreen:Boolean (default = true ) — if player should go to fullscreen. False returns to default mode.
|
isMuted | () | method |
public function isMuted():Boolean
Returns whether the video player currently is muted.
ReturnsBoolean — True if the video is muted. False otherwise.
|
isPlayerDefined | () | method |
public function isPlayerDefined():Boolean
Returns whether the video player is defined for the player instance.
ReturnsBoolean — True if the video player is defined for the player instance.
|
isPlaying | () | method |
public function isPlaying():Boolean
Returns whether the video currently displayed in the video window is playing. If a linear ad is currently playing, this returns the state of the ad.
ReturnsBoolean — True if the video is playing. False otherwise.
|
loadVideo | () | method |
public function loadVideo(id:Object, property:String = id, mode:String = full):Boolean
Plays a video in the video window. If the video is not already loaded into the player, it will be fetched from the server.
Parameters
id:Object — ID or referenceID of the title to be played.
| |
property:String (default = id ) — the value passed as the first param is an ID or referenceID
(ContentModule.ID |ContentModule.REFERENCE_ID ).
| |
mode:String (default = full ) — mode to play the video in ("preview"|"full").
|
Boolean — True if the video is in the player and playback is begun.
|
mediaIsLive | () | method |
public function mediaIsLive():Boolean
Returns whether the current media loaded is live (true) or on demand (false).
ReturnsBoolean — True if media loaded into player is a live stream.
|
move | () | method |
public function move(x:Number, y:Number, global:Boolean = false):void
Positions the element within the experience.
Parameters
x:Number — pixel position of the element on the horizontal axis.
| |
y:Number — pixel position of the element on the vertical axis.
| |
global:Boolean (default = false ) — to use the global coordinate space, not local (default).
|
mute | () | method |
public function mute(mute:Boolean = true):void
Mutes or unmutes the sound in the player. If a linear ad is currently playing, this will mute the ad.
Parameters
mute:Boolean (default = true ) — to mute the player, false to unmute.
|
overlay | () | method |
public function overlay():Sprite
Returns an Sprite that overlays the video display area. You can use this to draw directly over the video display or to overlay external loaded swfs or images. This API is only available in ActionScript
ReturnsSprite |
videoPlayerModule = player.getModule(APIModules.VIDEO_PLAYER) as VideoPlayerModule; videoDisplayHeight = videoPlayerModule.getDisplayHeight(); videoDisplayWidth = videoPlayerModule.getDisplayWidth(); overlayHeight = 50; //pixels overlay = videoPlayerModule.overlay(); overlay.graphics.beginFill(0xFF0000,1); overlay.graphics.drawRect(0,videoDisplayHeight - overlayHeight , videoDisplayWidth, overlayHeight) overlay.graphics.endFill();
pause | () | method |
public function pause(pause:Boolean = true):void
Pauses or resumes playback of the current title in the video window. If a linear ad is currently playing, this will pause the ad.
Parameters
pause:Boolean (default = true ) — a true value will pauses the video playback.
Passing false will resume playback.
|
play | () | method |
public function play():void
Starts playback of the current title in the video window. If a linear ad is currently playing, this will unpause the ad.
removeUserMessage | () | method |
public function removeUserMessage():void
Removes the user message dialog, if present.
requestRenditionChange | () | method |
public function requestRenditionChange():void
Forces the rendition selection algorithm to run, potentially changing the currently playing rendition.
seek | () | method |
public function seek(time:Number):void
Seeks to a specified time position in the video.
Parameters
time:Number — time in seconds to seek to.
|
setAlpha | () | method |
public function setAlpha(alpha:Number):void
Sets the alpha value of the component.
Parameters
alpha:Number — alpha value of the component.
|
setBackBufferCapacity | () | method |
public function setBackBufferCapacity(pTime:uint):void
Sets the desired maximum capacity of the back buffer. The back buffer allows the player to store video content as it is played. This provides similiar features to the forward buffer, but in a playbar region behind the playhead. For streaming content this capacity applies an upper limit on the amount of seconds of video that can be stored in the back buffer. These buffered seconds are of cached video behind the current playhead position. For progressive download content this capactity will not limit the amount of back buffer as progressive download will attempt to download and store the entire video asset. Akamai HD content will not be affected by the use of this method. If unset, the back buffer capacity defaults to 0 seconds. For more information on buffering please see the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method.
Parameters
pTime:uint — capacity of the back buffer in seconds.
|
setBitRateRange | () | method |
public function setBitRateRange(min:int, max:Number):Object
Sets the minimum and maximum available renditions.
Parameters
min:int — Lowest desired bitrate (required)
| |
max:Number (default = NaN ) — Highest desired bitrate (optional)
|
Object — All available renditions.
|
setBlendMode | () | method |
public function setBlendMode(mode:String):void
Sets the blend mode of the component.
Parameters
mode:String — blend mode of the component.
|
setBufferCapacity | () | method |
public function setBufferCapacity(pTime:uint):void
Sets the desired maximum capacity of the buffer. The buffer allows the player to store video content ahead of the current playhead position to allow for smoother playback when using streaming content. For streaming content this capacity applies an upper limit to the amount of seconds of video that can be stored in the buffer. These buffered seconds are of cached video ahead of the current playhead position. Note that if all other requirements are met, the use of this setting will enable the buffered region to be shown in a differently shaded color on the play bar. The other requirements include: enabling the enhanced buffering account switch, ensuring that FMS 3.5.3 or higher is being used, and the flash player is at least version 10.1. For progressive download content this capacity will not limit the rate or amount it downloads as it will attempt to download the entire file. Akamai HD content will not be affected by the use of this method. The maximum capacity must be set higher then 60 seconds and lower then 3600 seconds. If not set the buffer capacity will have a default value of 60 seconds. For more information on buffering please see the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method.
Parameters
pTime:uint — capacity of the buffer in seconds.
|
setConnectOnLoad | () | method |
public function setConnectOnLoad(connect:Boolean):void
Sets whether for a streaming video the player should connect to FMS on load in order to determine user bandwidth or whether the connection should be delayed until playback is requested by the user. Keeping the connect-on-load behavior (the default, true) means a more instant-on experience for the user. For content delivered over rtmpt, however, setting this to false removes the need for the constant connection keep-alive requests prior to actual playback. This call needs to be made prior to the templateReady event in order to work with initially loaded content.
Parameters
connect:Boolean — Whether to have the player connect to FMS on load.
|
setDefaultBufferTime | () | method |
public function setDefaultBufferTime(time:uint):void
Sets the default buffer time in seconds that will be set on new stream instances. Buffer time is the number of seconds of video that will be buffered on the client. This buffer must be filled before initial playback. This is for streaming content only. See the article, Buffers, Bandwidth Detection, and Player Load Time for code examples for this method.
Parameters
time:uint — The number of seconds of video to buffer.
|
setEnabled | () | method |
public function setEnabled(enable:Boolean):void
Enables/disables component for events.
Parameters
enable:Boolean — value to enable (true) or disable (false).
|
setPrivacyMode | () | method |
public function setPrivacyMode(pMode:Boolean):void
Sets the current state of privacy mode (which is either set through the embed code or via an API). If true Akamai Media Analytics will be disabled, and the initial bandwidth detection cookie will be disabled and deleted. If privacy mode is set to false by the time the player has already loaded Akamai Media Analytics will not be disabled, in order to disbale Akamai Media Analytics privacy mode must be set via the embed code. If set to false the publisher's account settings will be used to determine whether these services are enabled or disabled.
Parameters
pMode:Boolean — When set to true all services that use tracking cookies will be disabled, when set to
false the publisher's account settings will be used to determine whether these services are
enabled or disabled.
|
setRenditionSelectionCallback | () | method |
public function setRenditionSelectionCallback(callback:Function):void
Sets callback for dynamic delivery determination so that developer can set which renditions play when the player changes size or the video buffer, or on initial playback.
Parameters
callback:Function — The function that determines which rendition to play.
|
setRotation | () | method |
public function setRotation(rotation:Number):void
Sets the rotation of the component.
Parameters
rotation:Number — rotation of the component in degrees.
|
setSize | () | method |
public function setSize(width:Number, height:Number):void
Sets the pixel dimensions of the element.
Parameters
width:Number — pixel width to set the element.
| |
height:Number — pixel height to set the element.
|
setStyles | () | method |
public function setStyles(styles:String):void
Overrides specific styles for a component by accepting a semicolon-delimited list of style names and colors.
Parameters
styles:String — semicolon-delimited list of style properties in the form "style-name:#nnnnnn;style-name:#nnnnnn".
|
setVideoFilter | () | method |
public function setVideoFilter(filter:Object):void
Applies a bitmap video filter to the video currently loaded. For a description of the available filters, see Video Filters.
Parameters
filter:Object — object describing the filter to apply. For example: {type:"blur"}
|
setVisible | () | method |
public function setVisible(visible:Boolean):void
Sets whether the component is visible.
Parameters
visible:Boolean — value determining whether component is visible.
|
setVolume | () | method |
public function setVolume(volume:Number):void
Sets the volume for video playback in the player. If a linear ad is currently playing, this change the volume of the ad.
Parameters
volume:Number — number between 0 and 1 to specify volume level.
|
showVolumeControls | () | method |
public function showVolumeControls(show:Boolean = true):void
Opens or closes the volume controls over the video screen, depending on the argument passed in. If no argument is passed, the player will open the controls if it is not already open.
Parameters
show:Boolean (default = true ) — the controls should be open or closed. The default value is true.
|
stop | () | method |
public function stop():void
Stops playback of the current title in the video window, sending its position to the start.
toggleMenuPage | () | method |
public function toggleMenuPage(page:String, media:Object = null):void
Toggles Brightcove menu, opening to specified page with data displayed for the media passed in, or closing menu if page is displayed for the same media.
Parameters
page:String — page to open.
| |
media:Object (default = null ) — media to open menu about.
|
toggleVolumeControls | () | method |
public function toggleVolumeControls():void
Toggles the volume controls opened and closed.
mediaBegin | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.BEGIN
Dispatched when media playback first begins. This will only occur on initial playback, not on replay.
The MediaEvent.BEGIN constant defines the value of thetype
property of the event object for a
mediaBegin
event. BEGIN events are dispatched
when media playback first begins. This will only occur on
initial playback, not on replay.
mediaBufferBegin | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.BUFFER_BEGIN
Dispatched when a buffering window begins for the current media, pausing playback.
The MediaEvent.BUFFER_BEGIN constant defines the value of thetype
property of the event object for a
mediaBufferBegin
event. BUFFER_BEGIN events
are dispatched when a buffering window begins for the
current media, pausing playback.
mediaBufferComplete | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.BUFFER_COMPLETE
Dispatched when media finishes a buffering window.
The MediaEvent.BUFFER_COMPLETE constant defines the value of thetype
property of the event object for a
mediaBufferComplete
event. BUFFER_COMPLETE is
dispatched when media finishes a buffering window.
mediaChange | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.CHANGE
Dispatched when new media has been loaded or cued in the player.
The MediaEvent.CHANGE constant defines the value of thetype
property of the event object for a
mediaChange
event. CHANGE is dispatched when
new media has been loaded or cued in the player.
mediaComplete | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.COMPLETE
Dispatched when the current media completes. This only occurs on initial playback of media, not on replay.
The MediaEvent.COMPLETE constant defines the value of thetype
property of the event object for a
mediaComplete
event. COMPLETE events are
dispatched when the current media finishes. This only
occurs on initial playback of media, not on replay.
mediaEdge | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.EDGE
Dispatched when there is an onEdge event dispatched by the NetStream object.
The MediaEvent.EDGE constant defines the value of thetype
property of the event object for a
edge
event. EDGE events are dispatched when
there is an onEdge event dispatched by the NetStream
object.
mediaError | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.ERROR
Dispatched when there is an error connecting to or playing the current media.
The MediaEvent.ERROR constant defines the value of thetype
property of the event object for a
mediaError
event. ERROR is dispatched when
there is a problem connecting to or playing the current
media.
mediaMuteChange | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.MUTE_CHANGE
Dispatched when media's audio is muted or unmuted.
The MediaEvent.MUTE_CHANGE constant defines the value of thetype
property of the event object for a
mediaMuteChange
event. MUTE_CHANGE is
dispatched when media's audio is muted or unmuted.
mediaPlay | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.PLAY
Dispatched when media begins or resumes playback.
The MediaEvent.PLAY constant defines the value of thetype
property of the event object for a
mediaPlay
event. PLAY is dispatched when
media begins or resumes playback.
mediaProgress | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.PROGRESS
Dispatched as media is played back.
The MediaEvent.PROGRESS constant defines the value of thetype
property of the event object for a
mediaProgress
event. PROGRESS is dispatched
periodically while media is being played back.
mediaRenditionChangeComplete | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.RENDITION_CHANGE_COMPLETE
Dispatched when the transition to a new rendition is completed.
The MediaEvent.RENDITION_CHANGE_COMPLETE constant defines the value of thetype
property of the event object for a
mediaRenditionChangeComplete
event.
RENDITION_CHANGE_COMPLETE is dispatched when the
transition to a new rendition is completed.
mediaRenditionChangeRequest | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.RENDITION_CHANGE_REQUEST
Dispatched when a new rendition of the current media is requested.
The MediaEvent.RENDITION_CHANGE_REQUEST constant defines the value of thetype
property of the event object for a
mediaRenditionChangeRequest
event.
RENDITION_CHANGE_REQUEST is dispatched when a new
rendition of the current media is requested.
mediaSeek | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.SEEK
Dispatched when media is requested to be sent to a new position.
The MediaEvent.SEEK constant defines the value of thetype
property of the event object for a
seek
event. SEEK is dispatched when media is
requested to be sent to a new position.
mediaSeekNotify | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.SEEK_NOTIFY
Dispatched when media has completed being sent to a new position.
The MediaEvent.SEEK_NOTIFY constant defines the value of thetype
property of the event object for a
seek
event. SEEK_NOTIFY events are dispatched
when media has completed being sent to a new position.
mediaStop | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.STOP
Dispatched when media is paused or stopped.
The MediaEvent.STOP constant defines the value of thetype
property of the event object for a
mediaStop
event. STOP events are dispatched
when media is paused or stopped.
mediaVolumeChange | Event |
com.brightcove.api.events.MediaEvent
com.brightcove.api.events.MediaEvent.VOLUME_CHANGE
Dispatched when the volume in the player is changed.
The MediaEvent.VOLUME_CHANGE constant defines the value of thetype
property of the event object for a
mediaVolumeChange
event. VOLUME_CHANGE is
dispatched when the volume in the player is changed.
CONTENT_TYPE_AD | Constant |
public static const CONTENT_TYPE_AD:String = ad
CONTENT_TYPE_BUMPER | Constant |
public static const CONTENT_TYPE_BUMPER:String = bumper
CONTENT_TYPE_VIDEO | Constant |
public static const CONTENT_TYPE_VIDEO:String = video