Livestream plugin

This plugin automatically polls an RTMP stream for availability every XX seconds. If the stream is there, it will kick in. If not, the plugin will keep retrying. It allows users to wait for a live event without having to refresh their page.

This plugin is compatible with version 4.4 of the player.

Example

Here is an example of the Livestream plugin in action. It doesn't refer to an actual live stream, but to an on-demand one, but the mechanism is the same.

Get the Flash Player to see this player.

plugins=livestream&livestream.file=vdoxadmin/jeroen/bunny.flv&livestream.streamer=rtmp://fl9.maelstrom.jet-stream.nl/vod/

Configuration

The plugin is loaded with the flashvar plugins=livestream. This will automatically load the latest version of the plugin straight off our servers. It offers a string of flashvars for tweaking the plugin:

  • livestream.file (undefined): name of the RTMP stream to check and load.
  • livestream.image (undefined): image associated with the livestream. It is shown when the live stream ends. It should typically say something like "thanks for watching".
  • livestream.interval (15): interval in seconds for polling the livestream. Don't set this too small or you will kill your servers.
  • livestream.message (Checking for livestream...): message to show in the display when polling the livestream.
  • livestream.streamer (undefined): RTMP server to pull the stream from (e.g. rtmp://myserver.com/live-app).
  • livestream.tags (undefined): this is a fairly advanced flashvar. If you play multiple videos with one player setup, set this flashvar to filter in which videos the livestream will be polled and loaded. The livestream will only be polled when the tags of the video align with the tags you enter here. If you don't need filtering, just ignore this flashvar.

You can still display a regular video in the player (with the file flashvar). This video should be a short teaser for the upcoming livestream, saying something like Hold on, livestream coming up.... The plugin will automatically loop that video (by internally setting the flashvar repeat=always).

Source code

The source code of this plugin can be obtained in a zip (click the zip links at the bottom) or through Subversion:

svn co http://developer.longtailvideo.com/svn/plugins/livestream

If you don't have a Subversion client, check out Tortoise (Windows) or SC Plugin (MAC).

You don't need Adobe Flash to modify this plugin. Instead, you can edit the plugin with any text editor you like. The plugin can be compiled with the free, cross-platform MXMLC compiler. See our plugin compiling overview for more info.