Packagecom.brightcove.api.modules
Classpublic class SocialModule
InheritanceSocialModule Inheritance APIModule Inheritance flash.events.EventDispatcher

API class for handling social features.



Public Properties
 PropertyDefined by
 Inheritedmodule : Object
Returns the instance of the module that is wrapped by this instance.
APIModule
Public Methods
 MethodDefined by
  
SocialModule(module:Object)
Constructor.
SocialModule
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void
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
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
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
Protected Methods
 MethodDefined by
 Inherited
redispatchEvent(event:Event):void
Sends the specified event, usually sent from a handler in order to bubble up non-bubbling events.
APIModule
  
wrapEvent(event:Event):void
Wraps the internal player event with a wrapper event class.
SocialModule
Events
 EventSummaryDefined by
   Dispatched when the embed code for a video is retrieved from the server.SocialModule
Public Constants
 ConstantDefined by
  EMBED_CODE_RETRIEVED : String = "embedCodeRetrieved"
[static]
SocialModule
Constructor detail
SocialModule()constructor
public function SocialModule(module:Object)

Constructor.

Parameters
module:Object — The module to wrap with this API class.
Method detail
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 — True 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.

Parameters
id:Number (default = -1) — A 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.

Returns
String — String that is the experience link.
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 — The 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 — The 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 — A string containing the email of the sender.
 
toEmail:String — A comma-delimited string of email addresses to send the link to.
 
message:String — An optional string containing a message from the sender.

Returns
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.
wrapEvent()method 
protected override function wrapEvent(event:Event):void

Wraps the internal player event with a wrapper event class.

Parameters
event:Event — Any event.
Event detail
embedCodeRetrievedevent 
Event object type: com.brightcove.api.events.EmbedCodeEvent
EmbedCodeEvent.type property = com.brightcove.api.events.EmbedCodeEvent.EMBED_CODE_RETRIEVED

Dispatched when the embed code for a video is retrieved from the server.

The EmbedCodeEvent.EMBED_CODE_RETRIEVED constant defines the value of the type property of the event object for a embedCodeRetrieved event.

Constant detail
EMBED_CODE_RETRIEVEDconstant
public static const EMBED_CODE_RETRIEVED:String = "embedCodeRetrieved"