Developer Resources - Flash Player API:s

« Back


Flash player embed

Revision 1.07 - updated 2011.10.06

The below instructions describe how to embed a Flash player. For a more generic embed which works on mobile devices to a greater extent, see the HTML player API

Embed Code

The recommended player embed code has this format:

<object id="bplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="320" height="276"><embed name="bplayer" src="http://static.bambuser.com/r/player.swf" type="application/x-shockwave-flash" flashvars="[---FLASHVARS---]" width="320" height="276" allowfullscreen="true" allowscriptaccess="always" wmode="opaque"></embed><param name="movie" value="http://static.bambuser.com/r/player.swf"></param><param name="flashvars" value="[--- FLASHVARS---]"></param><param name="allowfullscreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param></object>

...where [---FLASHVARS---] is replaced by a string of parameters of the form "vid=xxxx&mute=yes" Note that you need to insert the flashvars in two places!

FlashVars

Required
vid The video id: used to target a specific video.
Must be left out if username is specified.

Ways to obtain a vid:
  • vid is included in responses from the metadata feed API
  • vid can be deriverd from the following url schema:

    Shorter form url: http://bambuser.com/v/[vid]

    Longer form url: http://bambuser.com/channel/[username]/broadcast/[vid]
  • vid is included in auto-generated embed codes on the site.
username The username of the broadcasting user.
Must be specified when the latest content from a specific user is desired, ie either the current live broadcast or the latest archived video if no ongoing broadcast is found.
Must be left out when vid is specified.

You can specify multiple users separated by a comma (,) which targets the most recent video from all videos the selected users have produced.

The value must be url encoded i.e.
' ' (space)»+
Å»%C3%A5
etc...
Optional
autostart Overrides the autoplay behavior.

Available options:
yes
no

Default behavior:
When a live stream is targeted, ie when the username parameter is specified and the user happens to be live, the player autostarts.Otherwise it does not autostart.
mute Sets the default audio mode.

Available options:
yes
no (default)
live
archived
chat Allows disabling of chat functionality.

Available options:
yes (default)
no

Player theme

Some aspects of the player, like the color scheme, is controlled by the owner of each broadcast via Dashboard.

See also: Help - "Customize your player"

Player dimensions

The player's width and height can be chosen freely as long as the player is large enough to fit its visual elements and it's aspect ratio makes sense. Width below 220px is not recommended.

Compact mode: When the player's aspect ratio is close to the broadcast's aspect ratio, functionality like chat and broadcast archive is layered on top of the video.

Expanded mode: When the player has a significant amount of extra space below the video, extra functionality is automatically placed there instead.

See also: Help - "How do I embed my broadcasts on other sites?"

Examples

Here is a sample result when embedding with "username=Jonny"

And here is a sample result when embedding a specific video "vid=1234"

This is an example of Expanded mode. The video uses the space needed to display in the correct aspect ratio. The rest of the real estate is used for additional functionality like chat and broadcast archive.


You can leave feedback to Bambuser Crew via this form.