Package | com.brightcove.api.components |
Class | public class AdvertisingContext |
Inheritance | AdvertisingContext ![]() ![]() ![]() |
AdvertisingContext
component in the player. This component is implied in BEML
if advertising is enabled in the player. There's no need to add an AdvertisingContext
node in custom BEML as this component is instantiated once per player load and can be
accessed by using the ID "adContext".
The AdvertisingContext
is usually required when using the MediaControls
components with
advertising. The component itself is not visual and simply holds the visual state of what
the player controls should look like when an ad renders. The "visible" property of custom
MediaControls can be bound to any of the available properties in AdvertisingContext
, to
easily simulate the Brightcove default ad mode.
There are three different ad modes in Brightcove players that the AdvertisingContext
component supports:
1) Brightcove default ad mode (shows play/pause, sponsor message text, ad countdown, maximize
and volume; hides video position, video duration, playhead, menu options, and menu)
2) AdvertisingModule.allowThirdPartyControl()
(same as Brightcove default ad mode)
3) AdvertisingModule.showSponsorMesssage()
(shows sponsor message text; hides everything else)
The ad mode creating by using AdvertisingModule.disableForExternalAd
is not yet supported
in AdvertisingContext
.
See http://support.brightcove.com for more details on how to use the AdvertisingContext
and for
custom BEML examples of using the AdvertisingContext with MediaControls
.
Property | Defined By | ||
---|---|---|---|
![]() | component : Object [read-only]
Returns a reference to the wrapped API element in the player, which can be used to get access to new
methods that might not be defined within this version of the SWC. | Component | |
maximizeVisible : Boolean [read-only]
Returns true if the maximize (ie: fullscreen) button should be visible, false
if the control should be hidden. | AdvertisingContext | ||
menuOptionsVisible : Boolean [read-only]
Returns true if the menu button should be visible, false
if the control should be hidden. | AdvertisingContext | ||
menuVisible : Boolean [read-only]
Returns true if the menu button should be visible, false
if the control should be hidden. | AdvertisingContext | ||
playheadVisible : Boolean [read-only]
Returns true if the playhead should be visible, false
if the playhead should be hidden. | AdvertisingContext | ||
playPauseVisible : Boolean [read-only]
Returns true if the play/pause toggle button should be visible, false
if the control should be hidden. | AdvertisingContext | ||
sponsorMessageVisible : Boolean [read-only]
Returns true if the sponsor message text should be visible, false
if it should be hidden. | AdvertisingContext | ||
timePositionVisible : Boolean [read-only]
Returns true if the ad time position text should be visible, false
if it should be hidden. | AdvertisingContext | ||
volumeVisible : Boolean [read-only]
Returns true if the volume controls should be visible, false
if the control should be hidden. | AdvertisingContext |
Method | Defined By | ||
---|---|---|---|
AdvertisingContext(element:Object)
Constructor. | AdvertisingContext | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void [override]
Adds a listener for an event. | UIObject | |
![]() | getAlpha():Number
Returns the alpha value of the component. | Component | |
![]() | getBlendMode():String
Returns the blend mode of the component. | UIObject | |
![]() |
Returns the interface for the layout container of the element. | Component | |
![]() | getCSS():String
Returns the CSS used for this component instance. | UIObject | |
![]() | getDefinition():String
Returns the XML (BEML) definition of the component. | Component | |
![]() | getEnabled():Boolean
Returns whether component is enabled. | UIObject | |
![]() | getHeight():Number
Returns the pixel height of the component. | Component | |
![]() | getID():String
Returns the ID of the component, as defined in the XML. | Component | |
![]() | getIncludeInLayout():Boolean
Returns whether the component is included in layout calculations and rendering in parent layout box. | Component | |
![]() | getIndex():int
Returns the index of this element in its parent's elements array. | Component | |
![]() | getNextSibling():Object
Returns the interface for the layout element that is the next sibling to this element in the parent containers's element array. | Component | |
![]() | getNodeName():String
Returns the node name of the element. | Component | |
![]() | getPreviousSibling():Object
Returns the interface for the layout element that is the previous sibling to this element in the parent containers's element array. | Component | |
![]() | getRotation():Number
Returns the rotation of the component. | UIObject | |
![]() | getVisible():Boolean
Returns whether the component is visible. | Component | |
![]() | getWidth():Number
Returns the pixel width of the component. | Component | |
![]() | getX(global:Boolean = false):Number
Returns the position of the component on the x axis. | Component | |
![]() | getY(global:Boolean = false):Number
Returns the position of the component on the y axis. | Component | |
![]() | move(x:Number, y:Number, global:Boolean = false):void
Sets the x,y coordinates of the component. | Component | |
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void [override]
Removes a listener for an event. | UIObject | |
![]() | setAlpha(alpha:Number):void
Sets the alpha value of the component. | Component | |
![]() | setBlendMode(mode:String):void
Sets the blend mode of the component. | UIObject | |
![]() | setEnabled(enable:Boolean):void
Enables/disables component for events. | UIObject | |
![]() | setIncludeInLayout(includeInLayout:Boolean):void
Sets whether the component is included in layout calculations and rendering in parent layout box. | Component | |
![]() | setRotation(rotation:Number):void
Sets the rotation of the component. | UIObject | |
![]() | setSize(width:Number, height:Number):void
Sets the pixel dimensions for the wrapped component. | Component | |
![]() | setStyles(styles:String):void
Overrides specific styles for a component by accepting a semicolon-delimited list of style names and colors. | UIObject | |
![]() | setVisible(visible:Boolean):void
Sets whether the component is visible. | Component |
maximizeVisible | property |
maximizeVisible:Boolean
[read-only]
Returns true if the maximize (ie: fullscreen) button should be visible, false
if the control should be hidden. Only one ad mode changes the visible property
of the maximize control, AdvertisingModule.showSponsorMessage()
.
public function get maximizeVisible():Boolean
See also
menuOptionsVisible | property |
menuOptionsVisible:Boolean
[read-only] Returns true if the menu button should be visible, false if the control should be hidden. All three supported ad modes change the visible property of the menu control.
public function get menuOptionsVisible():Boolean
See also
menuVisible | property |
menuVisible:Boolean
[read-only] Returns true if the menu button should be visible, false if the control should be hidden. All three supported ad modes change the visible property of the menu control.
public function get menuVisible():Boolean
See also
playheadVisible | property |
playheadVisible:Boolean
[read-only] Returns true if the playhead should be visible, false if the playhead should be hidden. All three supported ad modes change the visible property of the playhead.
public function get playheadVisible():Boolean
See also
playPauseVisible | property |
playPauseVisible:Boolean
[read-only]
Returns true if the play/pause toggle button should be visible, false
if the control should be hidden. Only one ad mode changes the visible property
of the play/pause control, AdvertisingModule.showSponsorMessage()
.
public function get playPauseVisible():Boolean
See also
sponsorMessageVisible | property |
sponsorMessageVisible:Boolean
[read-only] Returns true if the sponsor message text should be visible, false if it should be hidden. All three supported ad modes change the visible property of the sponsor message text - it is always visible during the ad modes and invisible when content is playing.
public function get sponsorMessageVisible():Boolean
See also
timePositionVisible | property |
timePositionVisible:Boolean
[read-only] Returns true if the ad time position text should be visible, false if it should be hidden. All three supported ad modes change the visible property of the ad time position text - it is always visible during the ad modes and invisible when content is playing.
public function get timePositionVisible():Boolean
See also
volumeVisible | property |
volumeVisible:Boolean
[read-only]
Returns true if the volume controls should be visible, false
if the control should be hidden. Only one ad mode changes the visible property
of the volume control, AdvertisingModule.showSponsorMessage()
.
public function get volumeVisible():Boolean
See also
AdvertisingContext | () | Constructor |
public function AdvertisingContext(element:Object)
Constructor.
Parameterselement:Object — layout element to wrap and delegate all calls to.
|