Revver Developer Center: Flash : Player

Revver Developer Center



Introduction

The Revver Flash Player is a progressive download player built to seamlessly deliver Revver flash videos and accompanying dynamic advertisements. The Flash player offers a few basic customizations -- including the ability to brand the player with a custom logo.

Requirements

Revver transcodes all video to FLV version 8 or higher. In order to view videos with the Revver Flash Player, Flash Player version 8 or higher must be installed on the client’s machine. If you are using standard embeds and not the javascript embed, you must also include allowScriptAcess="always" as one of your parameters (see example below).

Player Parameters

The following are the parameters that the flash player currently accepts: Note that all parameters are case sensitive. Parameters can either be placed in "flashvars" section in embeds, or as part of the URL when calling the SWF. See Special Notes.

Parameter Type Description
mediaId Integer The id of the media file to play
Required.
affiliateId integer The numeric id of the user sharing the video and earning the sharer fee.
autoStart boolean Indicates whether a video displays a poster with user-action required or automatically plays on page load.
pngLogo url Accepts a 70x20 transparent PNG that replaces the Revver logo in the bottom right corner.
allowFullScreen boolean Determines whether a full screen button will be available on the player. Does not affect Linux embeds as Linux Flash Player does not yet support full screen mode (The fullscreen function uses Adobe's native full screen support added in Flash player 9.0.28).
bgColor hex color value Changes the background color of the embed.
width integer Explicitly sets the height of the video (embed height must be set as well)
height integer Explicitly sets the height of the video (embed height must be set as well)
displayMenu boolean hides menu button and makes menu inaccessible.
relatedVideos boolean toggles whether or not the related video option is displayed.
creatorVideos boolean toggles whether or not the "more from this user" option is displayed.
shareUrl string Can be either "revver", "videoApiUrl" or "embedUrl".
If "videoApiUrl" then share URL corresponds to the URL set in the video's meta-data (accessible via API).
If "embedUrl", then share URL corresponds to the URL of the page with the Flash embed.
frontColor HTML Color/Hex Color of the foreground Elements
backColor HTML Color/Hex Color of the background elements
gradColor HTML Color/Hex Color of the gradient on the background elements.

Javascript

Revver.com includes two standard embed options for the flash player -- one using JavaScript and another using the deprecated HTML <embed> tag.

Additionally, a fully XHTML compliant embed could be used, however is not listed on the revver.com site.

Simple JavaScript Embed

When a mediaId is included as a query string on the js call, a flash embed is created inline on the page -- allowing for multiple embeds on a page using the below notation.

<script src="http://flash.revver.com/player/1.0/player.js?PARAM:VALUE;" type="text/javascript"></script>

Advanced JavaScript Embed

When a mediaId is included as a query string on the js call, a flash embed is created inline on the page -- allowing for multiple embeds on a page using the below notation.

<!-- in HEAD of document -->
<script src="http://flash.revver.com/player/1.0/player.js" type="text/javascript"></script>

<script type="text/javascript">
/* <![CDATA[ */
   revverVideo.embed( {mediaId : "INT", PARAM : "VALUE",} );
/* ]]> */
</script>

Additional Parameters

Parameter Type Description
divId id of div Replaces out the contents of the div with the id specified
usePrivateDiv boolean Useful in some AJAX situations, will create a nested div to place the embed in
flashvars string Will pass any entered string to the flashvars of the embed

NOTE: If entering a url, use %3A instead of a “:” -- as this is the delimiter between parameter and value for the JS embeds.

Embed

The standard embed is typically used in social networking sites where the proper object tag is removed for security considerations. This is NOT recommended for general use.
<embed type="application/x-shockwave-flash" src="http://flash.revver.com/player/1.0/player.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="noScale" salign="TL" bgcolor="#000000" flashvars="mediaId=INT&affiliateId=INT&allowFullScreen=true" allowfullscreen="true" height="392" width="480"
allowScriptAccess="always"
></embed>

XHTML Compliant Embed

The proper way to embed a video (however because of IE patent issues, embedding via JavaScript is usually preferred).

Also please note that when using the object tag, you need to put an "id", or the embedded player may not function properly. The JavaScript code for embedding the player does this for you.

<!-- This example is provided for readabiltiy only.
     When using "object" tags, to ensure compatibility
    its recommended that all params be on the same line. -->
<object
    width="480"
    height="392"
    data="http://flash.revver.com/player/1.0/player.swf?mediaId=12345"
    type="application/x-shockwave-flash"
    id="revvervideo012345">
    <param name="Movie" value="http://flash.revver.com/player/1.0/player.swf?mediaId=12345"></param>
    <param name="FlashVars" value="allowFullScreen=true"></param>
    <param name="AllowFullScreen" value="true"></param>
    <param name="AllowScriptAccess" value="always"></param>
    <embed type="application/x-shockwave-flash"
        src="http://flash.revver.com/player/1.0/player.swf?mediaId=12345"
        pluginspage="http://www.macromedia.com/go/getflashplayer"
        allowScriptAccess="always"
        flashvars="allowFullScreen=true"
        allowfullscreen="true"
        height="392"
        width="480">
    </embed>
</object>

<!-- The proper use is below -->
<object width="480" height="392" data="http://flash.revver.com/player/1.0/player.swf?mediaId=12345" type="application/x-shockwave-flash" id="revvervideo012345"><param name="Movie" value="http://flash.revver.com/player/1.0/player.swf?mediaId=12345"></param><param name="FlashVars" value="allowFullScreen=true"></param><param name="AllowFullScreen" value="true"></param><param name="AllowScriptAccess" value="always"></param><embed type="application/x-shockwave-flash" src="http://flash.revver.com/player/1.0/player.swf?mediaId=12345" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" flashvars="allowFullScreen=true" allowfullscreen="true" height="392" width="480"></embed></object>

Special Notes

Do you provide direct access to the FLV files?

Unfortunately, in order to preserve the advertising that rewards our creators and sharers for their work, we must protect the FLV files from being accessed without the Revver Flash Player.

Are there any skinning options?

Yes, you can use "frontColor", "backColor" and "gradColor" to alter colors. Also, you can build a completely custom SWF skin using the Flash Player Core.

Embed doesn't work on my social networking site/blog, etc.

Sometimes for security reasons sites will remove "flashvars" from your embeds on submission. The workaround is to include the vars in the URL directly. See Below:

param name=flashvars value="mediaId=363950&affiliateId=12345&allowFullScreen=true"
is the same as...
src="http://flash.revver.com/player/1.0/player.swf?mediaId=363950&affiliateId=12345&allowFullScreen=true"