Package | com.brightcove.api.modules |
Class | public class SocialModule |
Inheritance | SocialModule ![]() ![]() |
Method | Defined By | ||
---|---|---|---|
SocialModule(module:Object)
Constructor. | SocialModule | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void [override]
Adds a listener for an event. | APIModule | |
enableBlogging(enable:Boolean):void
Enables or disables blog options for the player, if they were previously enabled in the player settings. | SocialModule | ||
getEmbedCode(id:Number = -1):void
Retrieves the embed code for a specific video. | SocialModule | ||
getLink():String
Creates and returns the link for the current experience. | SocialModule | ||
isURLShortenedForMedia(mediaID:Number):Boolean
Returns whether the shortened URL has been generated (or attempted) for the
specified media. | SocialModule | ||
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void [override]
Removes a listener for an event. | APIModule | |
setEmbedCode(code:String):void
Sets the embed code that will be shown in and copied from the player. | SocialModule | ||
setLink(linkURL:String):void
Sets a new link that will be used in the Get Link menu state
as well as in emailed videos. | SocialModule | ||
shareVideoViaEmail(fromEmail:String, toEmail:String, message:String):Boolean
Sends a link the current video via email. | SocialModule |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the embed code for a video is retrieved from the server. | SocialModule | |||
Dispatched when a shortened link to the player and video is retrieved from the server. | SocialModule |
Constant | Defined By | ||
---|---|---|---|
EMBED_CODE_RETRIEVED : String = embedCodeRetrieved [static]
Event type constant
| SocialModule | ||
LINK_GENERATED : String = linkGenerated [static]
Event type constant
| SocialModule |
SocialModule | () | Constructor |
public function SocialModule(module:Object)
Constructor.
Parametersmodule:Object — module to wrap with this API class.
|
enableBlogging | () | method |
public function enableBlogging(enable:Boolean):void
Enables or disables blog options for the player, if they were previously enabled in the player settings.
Parameters
enable:Boolean — to enable the blog features in the player.
|
getEmbedCode | () | method |
public function getEmbedCode(id:Number = -1):void
Retrieves the embed code for a specific video. The result is not returned directly from this method and is instead returned within the embedCodeRetrieved event. You must listen for this event in order to get the embed code.
Parameters
id:Number (default = -1 ) — video id of the video to use when retrieving the embed code.
If a video id is not specified then the embed code will be
retrieved for the current video.
|
getLink | () | method |
public function getLink():String
Creates and returns the link for the current experience. This returns the same string that is shown in the Get Link state of the menu.
ReturnsString — String that is the experience link.
|
isURLShortenedForMedia | () | method |
public function isURLShortenedForMedia(mediaID:Number):Boolean
Returns whether the shortened URL has been generated (or attempted) for the
specified media. getLink()
will always return the current link to the media.
If this link has not yet been shortened by the backend service, a developer may wish
to know this in order to set up a listener to be informed when a shortened link has
been retrieved in order to surface this in a custom UI, for instance. This method will also
return true
if the shortened link has been requested and there was an error.
At that point a shortened link to that media will not be requested again.
Parameters
mediaID:Number — The ID of the media to check for a shortened url link to.
|
Boolean — True if the shortened url has been previously requested.
|
setEmbedCode | () | method |
public function setEmbedCode(code:String):void
Sets the embed code that will be shown in and copied from the player. This automatically disables blog options in the player since the embed code used for blogging will not be altered by this method. To enable the blog options, use enableBlogging(true). This will display the blog controls in the player menu, but the embed code used for blogs will be the default Brightcove embed code.
Parameters
code:String — embed code snippet that will be shown for the player.
|
setLink | () | method |
public function setLink(linkURL:String):void
Sets a new link that will be used in the Get Link menu state as well as in emailed videos.
Parameters
linkURL:String — url to use as the base of the link.
|
shareVideoViaEmail | () | method |
public function shareVideoViaEmail(fromEmail:String, toEmail:String, message:String):Boolean
Sends a link the current video via email.
Parameters
fromEmail:String — string containing the email of the sender.
| |
toEmail:String — comma-delimited string of email addresses to send the link to.
| |
message:String — optional string containing a message from the sender.
|
Boolean — True if pFromEmail and pToEmails are all valid email address. False if any are not valid, in which case, mail will not be sent.
|
embedCodeRetrieved | Event |
com.brightcove.api.events.EmbedCodeEvent
com.brightcove.api.events.EmbedCodeEvent.EMBED_CODE_RETRIEVED
Dispatched when the embed code for a video is retrieved from the server. See EmbedCodeEvent for more details on this event.
The EmbedCodeEvent.EMBED_CODE_RETRIEVED constant defines the value of thetype
property of the event object for a
embedCodeRetrieved
event.
linkGenerated | Event |
com.brightcove.api.events.ShortenedLinkEvent
com.brightcove.api.events.ShortenedLinkEvent.LINK_GENERATED
Dispatched when a shortened link to the player and video is retrieved from the server. See ShortenedLinkEvent for more details on this event.
The ShortenedLinkEvent.LINK_GENERATED constant defines the value of thetype
property of the event object for a
linkGenerated
event.
EMBED_CODE_RETRIEVED | Constant |
public static const EMBED_CODE_RETRIEVED:String = embedCodeRetrieved
Event type constant
LINK_GENERATED | Constant |
public static const LINK_GENERATED:String = linkGenerated
Event type constant