Package | com.brightcove.api.modules |
Class | public class MenuModule |
Inheritance | MenuModule ![]() ![]() |
Method | Defined By | ||
---|---|---|---|
MenuModule(module:Object)
Constructor. | MenuModule | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void [override]
Adds a listener for an event. | APIModule | |
closeMenuPage():void
Closes the menu page and icon menu, if opened. | MenuModule | ||
getAdditionalMediaForType(type:String):Array
Returns the additional media loaded for the given type. | MenuModule | ||
getCurrentMenuPage():String
Returns the string name of the current menu page. | MenuModule | ||
getOverlayMenuVisible():Boolean
Gets the overlay menu visibility. | MenuModule | ||
isMenuPageShowing():Boolean
Returns whether or not a menu page is showing. | MenuModule | ||
isOverlayMenuShowing():Boolean
Returns whether or not the overlay menu is showing. | MenuModule | ||
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void [override]
Removes a listener for an event. | APIModule | |
removeOverlayMenu():void
Removes overlay menu from player. | MenuModule | ||
setAdditionalMediaCallback(callback:Function, types:Array = null):void
Sets the callback for when additional media needs to be requested for the current media in the player. | MenuModule | ||
setAdditionalMediaForType(media:Array, type:String):void
Sets the additional media to display for a specific type for the current media in the player. | MenuModule | ||
setOverlayMenuVisible(visible:Boolean):void
Sets the overlay menu visibility. | MenuModule | ||
showMenuPage(page:String):void
Shows specified menu page
| MenuModule |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when an entry has been posted to a blog through the blog menu page. | MenuModule | |||
Dispatched when the "Copy Code" button on the "Get Code" menu page has been clicked. | MenuModule | |||
Dispatched when the "Copy Link" button on the "Get Link" or "Share" menu page has been clicked. | MenuModule | |||
Dispatched when a menu page has been closed. | MenuModule | |||
Dispatched when a menu page has been opened. | MenuModule | |||
Dispatched when the overlay menu has been closed. | MenuModule | |||
Dispatched when the overlay menu has been opened. | MenuModule | |||
Dispatched when the overlay menu play icon has been clicked. | MenuModule | |||
Dispatched when the "Send Email" button on the "Email This" menu page has been clicked. | MenuModule | |||
Dispatched when a video has been selected from the Info menu's list of additional videos. | MenuModule |
Constant | Defined By | ||
---|---|---|---|
CODE : String = Embed [static] | MenuModule | ||
EMAIL : String = Email [static] | MenuModule | ||
INFO : String = Info [static] | MenuModule | ||
LINK : String = Link [static] | MenuModule | ||
MOST_VIEWED_VIDEOS : String = most viewed videos [static] | MenuModule | ||
NEWEST_VIDEOS : String = newest videos [static] | MenuModule | ||
RELATED_VIDEOS : String = related videos [static] | MenuModule | ||
SHARE : String = Share [static] | MenuModule |
MenuModule | () | Constructor |
public function MenuModule(module:Object)
Constructor.
Parametersmodule:Object — module to wrap with this API class.
|
closeMenuPage | () | method |
public function closeMenuPage():void
Closes the menu page and icon menu, if opened.
getAdditionalMediaForType | () | method |
public function getAdditionalMediaForType(type:String):Array
Returns the additional media loaded for the given type. This should be an array of MediaDTOs.
Parameters
type:String — type that this array of media represents.
|
Array — The array of MediaDTOs loaded for the given type.
|
getCurrentMenuPage | () | method |
public function getCurrentMenuPage():String
Returns the string name of the current menu page.
ReturnsString — String name of the current menu page.
|
getOverlayMenuVisible | () | method |
public function getOverlayMenuVisible():Boolean
Gets the overlay menu visibility.
ReturnsBoolean — Whether or not the overlay menu is visible.
|
isMenuPageShowing | () | method |
public function isMenuPageShowing():Boolean
Returns whether or not a menu page is showing.
ReturnsBoolean — Boolean specifying whether or not a menu page is showing.
|
isOverlayMenuShowing | () | method |
public function isOverlayMenuShowing():Boolean
Returns whether or not the overlay menu is showing.
ReturnsBoolean — Boolean specifying whether or the overlay menu is showing.
|
removeOverlayMenu | () | method |
public function removeOverlayMenu():void
Removes overlay menu from player.
setAdditionalMediaCallback | () | method |
public function setAdditionalMediaCallback(callback:Function, types:Array = null):void
Sets the callback for when additional media needs to be requested for the current media in the player. This additional media is displayed in the Brightcove menu Info screen. This function should have the following signature: public function callbackFunction(type:String, media:MediaDTO=null):Boolean The Boolean return value represents if this call will be handled (true) or if the player should default to its own methods (false). If null is passed for the callback, then the default logic of the menu is used for fetching of additional vidoes. If null is passed for the types, then the default tabs are used in the Info menu, "related videos", "most viewed" and "newest".
Parameters
callback:Function — function that should be called to get additional media for the current media.
| |
types:Array (default = null ) — types of additional media that can be selected for the current media. An array of strings.
If nothing is passed, then the default types in the playter are used, RELATED_VIDEOS, MOST_VIEWED_VIDEOS, NEWEST_VIDEOS.
|
setAdditionalMediaForType | () | method |
public function setAdditionalMediaForType(media:Array, type:String):void
Sets the additional media to display for a specific type for the current media in the player. This should be an array of MediaDTO.
Parameters
media:Array — array of MediaDTOs to display for the given type.
| |
type:String — type that this array of media represents.
|
setOverlayMenuVisible | () | method |
public function setOverlayMenuVisible(visible:Boolean):void
Sets the overlay menu visibility.
Parameters
visible:Boolean — or not the overlay menu is visible.
|
showMenuPage | () | method |
public function showMenuPage(page:String):void
Shows specified menu page
Parameters
page:String — specifying menu page to show.
|
blogPostClick | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.BLOG_POST_CLICK
Dispatched when an entry has been posted to a blog through the blog menu page.
The MenuEvent.BLOG_POST_CLICK constant defines the value of thetype
property of the event object for a
blogPostClick
event.
copyCode | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.COPY_CODE
Dispatched when the "Copy Code" button on the "Get Code" menu page has been clicked.
The MenuEvent.COPY_CODE constant defines the value of thetype
property of the event object for a
copyCode
event.
copyLink | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.COPY_LINK
Dispatched when the "Copy Link" button on the "Get Link" or "Share" menu page has been clicked.
The MenuEvent.COPY_LINK constant defines the value of thetype
property of the event object for a
copyLink
event.
menuPageClose | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.MENU_PAGE_CLOSE
Dispatched when a menu page has been closed.
The MenuEvent.MENU_PAGE_CLOSE constant defines the value of thetype
property of the event object for a
menuPageClose
event.
menuPageOpen | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.MENU_PAGE_OPEN
Dispatched when a menu page has been opened.
The MenuEvent.MENU_PAGE_OPEN constant defines the value of thetype
property of the event object for a
menuPageOpen
event.
overlayMenuClose | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.OVERLAY_MENU_CLOSE
Dispatched when the overlay menu has been closed. This means that rollover of the video will not reveal the menu. Rolling off the video causing the menu to be hidden but awaiting further interaction does not fire this event.
The MenuEvent.OVERLAY_MENU_CLOSE constant defines the value of thetype
property of the event object for a
overlayMenuClose
event.
overlayMenuOpen | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.OVERLAY_MENU_OPEN
Dispatched when the overlay menu has been opened. This means that rollover of the video will reveal the menu. When the menu is hidden by the user rolling off then revealed again by rollover, this event is not fired again. The event corresponds to the presence of the menu awaiting interaction, not its visible/hidden states due to mouse interaction.
The MenuEvent.OVERLAY_MENU_OPEN constant defines the value of thetype
property of the event object for a
overlayMenuOpen
event.
overlayMenuPlayClick | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.OVERLAY_MENU_PLAY_CLICK
Dispatched when the overlay menu play icon has been clicked.
The MenuEvent.OVERLAY_MENU_PLAY_CLICK constant defines the value of thetype
property of the event object for a
overlayMenuPlayClick
event.
sendEmailClick | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.SEND_EMAIL_CLICK
Dispatched when the "Send Email" button on the "Email This" menu page has been clicked.
The MenuEvent.SEND_EMAIL_CLICK constant defines the value of thetype
property of the event object for a
sendEmailClick
event.
videoRequest | Event |
com.brightcove.api.events.MenuEvent
com.brightcove.api.events.MenuEvent.VIDEO_REQUEST
Dispatched when a video has been selected from the Info menu's list of additional videos.
The MenuEvent.VIDEO_REQUEST constant defines the value of thetype
property of the event object for a
videoRequest
event.
CODE | Constant |
public static const CODE:String = Embed
Constant |
public static const EMAIL:String = Email
INFO | Constant |
public static const INFO:String = Info
LINK | Constant |
public static const LINK:String = Link
MOST_VIEWED_VIDEOS | Constant |
public static const MOST_VIEWED_VIDEOS:String = most viewed videos
NEWEST_VIDEOS | Constant |
public static const NEWEST_VIDEOS:String = newest videos
RELATED_VIDEOS | Constant |
public static const RELATED_VIDEOS:String = related videos
SHARE | Constant |
public static const SHARE:String = Share