header_graphic
header_gradient
 
  • Posted by ESA
  • Comments Off

With the ESA HD Media Player you can share your media content using the built-in Facebook, Twitter, Email, Link, and Embed buttons. All of these buttons can be enabled using FlashVars (e.g. share=”true” enables all of the share buttons); or you can enable each button individually using the  Skin Wizard (on our website) or Component Inspector (in the Controller Component – Flash CS4/5 required). The behavior of each button can be customized using Action Script 3.0 in the player FLA (included in all packages).

PLEASE NOTE: When using the share buttons you should use absolute urls for all media content including paths to xml, video, audio,  and image files.

Download share.php Sample File

Click Here To See A Working Example With All Share Buttons Enabled

Below is a description of the default behavior for each button.

Facebook Button:
When the Facebook button is pressed the player automatically submits the URL for the current page and media item to the user’s Facebook account (users must login to Facebook) where it will appear on their wall with a link back to your site. The URL includes variables for the current media item including the title (”t” url var; defined as the “title” FlashVars for single media items, or as the “name” attribute in an XML playlist), description (”d” url var; defined as the “desc” FlashVars for single media items, or as the “desc” attribute in an XML playlist), and thumbnail (”i” url var;  defined as the “image” FlashVars for single media items, or as the “image” attribute in an XML playlist). However, Facebook doesn’t pull the title, description, and image variables out of the URL — instead they pull this information out of the meta tags in your page. So in order to get the title, description, and thumbnail associated with the shared media item to display on Facebook your meta tags must be dynamic, and by including these variables in the URL we have taken the first step towards this goal. If your pages are PHP the rest is easy, simply use the PHP echo function to add the URL vars to your meta tags as shown in the “share.php” file that we include in every package. Otherwise, if your page are purely HTML there does not appear to be an easy solution, because Facebook won’t read JavaScript in the <head> of a document. If you are using ASP you can create your own custom meta tags using the variables we provide in the URL (sorry, we do NOT have an ASP example at this time). If you are using other variables in your page URLs you may need to customize scripts in the player FLA to preserve your variables. In the player FLA you can also customize the scripts in the “facebook” event handler.

Twitter Button:
When the Twitter button is pressed the player automatically submits the URL for the current page and media item to the user’s Twitter account (users must login to Twitter) where it will appear as a tweet with a link back to your site. The URL includes variables for the current media item including the title (”t” url var; defined as the “title” FlashVars for single media items, or as the “name” attribute in an XML playlist) and description (”d” url var; defined as the “desc” FlashVars for single media items, or as the “desc” attribute in an XML playlist). If you are using other variables in your page URLs you may need to customize scripts in the player FLA to preserve your variables. In the player FLA you can also customize the scripts in the “twitter” event handler.

Email Button:
When the Email button is pressed the player automatically opens an email in the user’s default email program, and the email is populated with a subject and message in the body including a URL for the current page and media item. The URL has variables for the current media item including “media” (path to single file or XML) and “id” (when using XML you should give each item in the playlist a unique “id”). If you are using other variables in your page URLs you may need to customize scripts in the player FLA to preserve your variables. In the player FLA you can also customize the scripts in the “email” event handler with a custom subject and message in the body of the email.

Link Button:
When the Link button is pressed the player automatically copies the URL for the current page and media item to the user’s clipboard, and the user can then paste it into another document (e.g. web page, email, etc). The copied URL has variables for the current media item including “media” (path to single file or XML) and “id” (when using XML you should give each item in the playlist a unique “id”). If you are using other variables in your page URLs you may need to customize scripts in the player FLA to preserve your variables.

Embed Button:
When the Embed button is pressed the player automatically copies the embed code for the current player and media item to the user’s clipboard, and the user can then paste it into their own web page. In the player FLA you can customize the scripts in the “embed” event handler to load a different player (e.g. a smaller player with fewer buttons) or media item (e.g. to embed the entire XML instead of a single item). With the Default and Phantom skins the embedded player loads the single media file that was playing when the embed button was pressed; with the Zoom and Media Grid skins the embedded player loads the entire XML playlist. When loading XML into an embedded player you must include a crossdomain.xml permissions file in the root of your web server to allow the transfer across domains (an example crossdomain.xml file is included in all packages).

Comments are closed.

footer_graphic

Support - Documentation - Skin Wizard - Sample Skins - Tutorials
Copyright © 2003-2011 Earth Science Agency, LLC - All Rights Reserved