LongTail Video is now JW Player - New Name, Same Passion For Video

Close

JW Player Support Documentation

Loading RSS Feeds

RSS feeds can be used to load playlists with multiple pieces of content into JW Player 6, but also to load multiple media formats and/or multiple quality levels for each piece of content.

JW Player requires the RSS feed to be valid and using the JWPlayer RSS namespace (preferred), the Media RSS namespace or vanilla RSS 2.0. All item and source attributes are supported with JWPlayer RSS, but not with Media RSS and definitely not with plain RSS.

Introduction

JW Player supports two mechanisms for loading playlists:

  • An inline JSON configuration. It is enabled by setting the playlist configuration option to an array of playlist items.
  • An external RSS Feed. It is enabled by setting the playlist configuration option to the URL of an RSS feed.

See Working with Playlists for info on loading playlists inline, plus info on the structure of playlists in JW Player 6.

Whichever option is the best depends upon your setup. Inline JSON configurations allow JW Player to load content faster (no extra file to load) and avoid any crossdomain loading issues. A crossdomain loading issue appears if your player is embedded at www.example.com and your RSS feed is loaded from www.othersite.com (or subdomain.example.com). By default, this is not allowed by any browser, in both Flash and HTML5 mode. See Crossdomain File Loading for more info and workarounds.

External RSS feeds are useful for larger scale media deployments, where separation of presentation (inline config options) and content (RSS feed) is preferred. External RSS is also useful when working with third-party content providers, directly loading the RSS feeds off their servers (e.g. for podcasts).

Examples

Here's an example jwplayer().setup() block that configures a player to load an RSS feed. Since the feed contains both file, title and image, only a single option is needed:

jwplayer("myElement").setup({
    playlist: "http://example.com/playlist.rss"
});

Feed with JWPlayer

Here's the RSS feed of this example (with just one video to keep things short), using the JW Player extension:

<rss version="2.0" xmlns:jwplayer="http://rss.jwpcdn.com/">
<channel>

  <item>
    <title>Sintel Trailer</title>
    <description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
    <jwplayer:image>/assets/sintel.jpg</jwplayer:image>
    <jwplayer:source file="/assets/sintel.mp4" />
  </item>

</channel>
</rss>

When authoring RSS feeds with JWPlayer or Media extensions, do not forget to add the xmlns:jwplayer or xmlns:media namespace to the top XML element. Otherwise, JW Player won't be able to parse the feed.

Mapping

Below is how all playlist item properties map to JWPlayer RSS, Media RSS and vanilla RSS. As you can see, not all properties (though most) are supported with Media RSS. This means that the JWPlayer and Media extensions are equally fine for basic setups, but JWPlayer must be used when setting features like source labels or text tracks. Plain RSS only provides very basic coverage and is really only useful for playing podcasts from third-party RSS providers.

Inline PlaylistRSS with JWPlayerRSS with Mediavanilla RSS
titletitletitletitle
descriptiondescriptiondescriptiondescription
mediaidguidguidguid
imagejwplayer:imagemedia:thumbnail@url-
source.filejwplayer:source@filemedia:content@urlenclosure@url
source.labeljwplayer:source@label--
source.defaultjwplayer:source@default--
source.typejwplayer:source@typemedia:content@typeenclosure@type
track.filejwplayer:track@filemedia:subtitle@url-
track.kindjwplayer:track@kind--
track.labeljwplayer:track@label--
track.defaultjwplayer:track@default--

See Supported Media Formats to find out which mimetypes should be used for which media formats.

Multiple Sources & Tracks

Having multiple sources and tracks per RSS item is possible with both JWPlayer and Media namespaces. Here is an example feed (using JWPlayer) with one item that has two MP4 video qualities and two VTT caption tracks:

<rss version="2.0" xmlns:jwplayer="http://rss.jwpcdn.com/">
<channel>

  <item>
    <title>Sintel Trailer</title>
    <description>Sintel is a fantasy CGI from the Blender Open Movie Project.</description>
    <jwplayer:image>/assets/sintel.jpg</jwplayer:image>
    <jwplayer:source file="/assets/sintel-640.mp4" label="360p" />
    <jwplayer:source file="/assets/sintel-1280.mp4" label="720p HD" />
    <jwplayer:track file="/assets/sintel-en.vtt" label="English" />
    <jwplayer:track file="/assets/sintel--fr.vtt" label="Fran├žais" />
  </item>

</channel>
</rss>

Note that multiple HLS streams and multiple RTMP streams are not supported. Adaptive HLS and dynamic RTMP streams always require an additional manifest file, which is loaded as a single source in the RSS feed.

YouTube

JW Player also supports direct loading of playlists in RSS format from YouTube. This works in Flash mode only at present (YouTube is working on an HTML5 player API). Every public YouTube playlist can be fetched as RSS through the following URL scheme:

http://gdata.youtube.com/feeds/api/playlists/[PLAYLIST]?alt=rss

Here is an example embed code that displays the CatVidFest playlist:

jwplayer("container").setup({
  playlist: "http://gdata.youtube.com/feeds/api/playlists/PLC0B137D835A3C970?alt=rss"
});

Still don't have the new JW Player? Get It Here