The purpose of this guide is to give you a feature overview of the JW Player HD Plugin.
The HD plugin for the JW Player gives your viewers a way to toggle between a high definition and standard definition version of your videos. It works in both Flash and HTML5. The HD toggle is displayed in the dock:

The plugin stores the viewer’s quality preference in a cookie, so they use a consistent video quality between different videos on a site. It supports playlists, YouTube and HTTP/RTMP streaming.
The HD plugin supports the following configuration options:
Note that, when using Flash and progressively downloaded video files, playback will restart from the beginning when entering fullscreen.
Here is a basic example of the plugin, setting just an hd.file:
<div id='player'>Get Flash to see the video</div>
<script type="text/javascript>
jwplayer('player').setup({
file: '/assets/standard.mp4',
flashplayer: '/assets/player.swf',
plugins: {
'hd-2': {
file: '/assets/highdef.mp4'
}
}
});
</script>
This example uses the - preferred - JW Embedder method. Please see our Supported Embed Methods guide for other options like SWFObject.
HD versions can be assigned to one or more videos in a playlist. The functionality is available for both inline and RSS playlists. Instead of setting the HD file URLs in the plugin configuration, they are set in the playlist.
Since the RSS playlist formats define elements for linking to HD files, the captions should be set using the JWPlayer XML namespace. In practice, the namespace is enabled by:
The config solely needs a reference to the HD plugin:
<div id='player'>Get Flash to see the video</div>
<script type="text/javascript>
jwplayer('player').setup({
flashplayer: '/assets/player.swf',
playlistfile: '/assets/playlist.xml',
plugins: {
'hd-2': {}
}
});
</script>
In the playlist.xml, the jwplayer:hd.file element defines the HD quality video for each entry:
<rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/">
<channel>
<item>
<title>My first video</title>
<description>This one starts the playlist.</description>
<jwplayer:file>sd-video.mp4</jwplayer:file>
<jwplayer:hd.file>hd-video.mp4</jwplayer:hd.file>
</item>
<item>
<title>My second video</title>
<description>This one concludes it all.</description>
<jwplayer:file>sd-video-2.mp4</jwplayer:file>
<jwplayer:hd.file>hd-video-2.mp4</jwplayer:hd.file>
</item>
</channel>
</rss>
Note the xmlns:jwplayer at the top! It is needed to validate the jwplayer:hd.file elements.
On touch devices (iPhone, iPad, Android), the HD plugin does not display an HD toggle. This because:
Instead, we strongly encourage you to look into the HTTP Live Streaming capabilities of iOS. This straightforward streaming protocol ensures an optimal video quality on iPhones and iPads.
We recommend using the HD plugin if you are using HTML5/Flash with progressively downloaded videos or if you are using an HTTP/RTMP server without adaptive/dynamic streaming capabilities. Here's the exact behavior when using the various streaming protocols:
Version 5.6 of the JW Player introduced improved YouTube support, amongst which the setting of the quality level for a video. The HD plugin leverages this feature. The plugin will detect if a video comes from YouTube, and offer a toggle if at least the hd720 quality level is available. At that point, the toggle allows switching between the hd720 and the and medium quality levels.
If a YouTube video is not available in at least hd720, the HD icon will get greyed out.
Here is an example using YouTube. Note the hd.file option is not needed:
<div id='player'>Get Flash to see the video</div>
<script type="text/javascript>
jwplayer('player').setup({
file: 'XSGBVzeBUbk',
flashplayer: '/assets/player.swf',
plugins: {
'hd-2': {}
},
provider: 'youtube'
});
</script>