The bandwidth detection plugin is used for this purpose. It detects the user's connection speed and serves the video accordingly. A faster speed means better video quality and larger file size.
This example uses pseudo-streaming in conjunction with bitrate detection. The bitrate is checked at startup as well as when switching between normal and fullscreen mode, and the video files are selected accordingly.
To detect the bandwidth the plugin downloads a file specified in the
property - we use the player binary
flowplayer-3.2.18.swf here - and
calculates the available bandwidth based on the download speed. This gives us a good enough
approximation to select the bitrate and the corresponding video file. If you need accurate
results you should take a look at the next demo which uses a true streaming
protocol (RTMP) instead of pseudostreaming.
You need to have different files for each bitrate. This configuration uses the following files: