Available Plugins
HD plugin
This plugin implements an HD quality toggle. It works for single files and playlists (in the latter case, a new playlist is loaded). It toggles:
- Based upon a users' bandwidth when the video starts.
- Based upon the fullscreen state if the hd.fullscreen flashvar is turned on.
- In response to a click on a button in the dock/controlbar.
This plugin is compatible with version 4.1+ of the player. For version 4.3+, a button can be shown in the controlbar. For version 4.5+, a button can be shown in the dock.
There's no support for HD switching per playlist entry. When in need of a playlist, create 2 XML files: one with the regular files and one with the HD files.
Example
Here is an example of the HD plugin in action. Below that is the string of flashvars used.
file=/player/testing/files/bunny.flv&plugins=hd&hd.file=/player/testing/files/bunny.m4v
Configuration
The plugin is loaded with the flashvar plugins=hd. This will automatically load the latest version of the plugin straight off our servers. It offers three flashvar for tweaking the plugin:
- hd.bitrate (1500): bitrate of the HD quality video. For progressive downloads or HTTP streaming, this flashvar doesn't have to be set, since it is automatically calculated from the video filesize. For RTMP streaming however, this flashvar needs to be set in order to enable automated bandwidth switching.
- hd.file (undefined): location of the HD quality video.
- hd.fullscreen (false): if set to true, the player will automatically switch to HD if fullscreen is entered and back to the regular file when fullscreen is exited.
- hd.state (true): if set to false, the player will start with the low-quality video, no matter the bandwidth of the user. The default, true, will let the player start the HD video and only fallback when the bandwidth is lower than the bitrate of the video.
In order to enable the automatic HD toggle for RTMP, the hd.bitrate flashvar needs to be set. Additionally, the RTMP server needs to have a public checkBandwidth call implemented. FMS and Wowza have this, but Red5 not (yet).
When using progressive downloads, an HD switch will cause the video to restart. When using RTMP or HTTP streaming, an HD switch will (besides some buffering) not interrupt video playback.
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/hd
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.
