| 1 | .. _playlistformats: |
|---|
| 2 | |
|---|
| 3 | Playlist Support |
|---|
| 4 | ================ |
|---|
| 5 | |
|---|
| 6 | First, note that playlist XML files are subject to the :ref:`crossdomain` of Flash. This means that a videoplayer on one domain cannot load a playlist from another domain. It can be fixed by placing a *crossdomain.xml* file at the server the playlist is loaded from. |
|---|
| 7 | |
|---|
| 8 | If your playlist and player.swf are hosted on the same domain, these restrictions don't apply. |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | Supported XML Formats |
|---|
| 13 | --------------------- |
|---|
| 14 | |
|---|
| 15 | That said, the following playlist formats are supported: |
|---|
| 16 | |
|---|
| 17 | * `ASX <http://msdn2.microsoft.com/en-us/library/ms910265.aspx>`_ feeds |
|---|
| 18 | * `ATOM <http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html#Understanding_Video_Entries>`_ feeds with `Media <http://search.yahoo.com/mrss>`_ extensions |
|---|
| 19 | * `RSS <http://cyber.law.harvard.edu/rss/rss.html>`_ feeds with `iTunes <http://apple.com/itunes/store/podcaststechspecs.html>`_ extensions and `Media <http://search.yahoo.com/mrss>`_ extensions |
|---|
| 20 | * `XSPF <http://xspf.org/specs>`_ feeds |
|---|
| 21 | |
|---|
| 22 | Here is an overview of all the tags of each format the player processes, and the entry in the JW Player playlist they correspond to: |
|---|
| 23 | |
|---|
| 24 | ============== ============== ============== ============== ============== ============== ============== |
|---|
| 25 | JW Player XSPF RSS itunes: media: ASX ATOM |
|---|
| 26 | ============== ============== ============== ============== ============== ============== ============== |
|---|
| 27 | author creator (none) author credit author (none) |
|---|
| 28 | date (none) pubDate (none) (none) (none) published |
|---|
| 29 | description annotation description summary description abstract summary |
|---|
| 30 | duration duration (none) duration content duration (none) |
|---|
| 31 | file location enclosure (none) content ref (none) |
|---|
| 32 | link info link (none) (none) moreinfo link |
|---|
| 33 | image image (none) (none) thumbnail (none) (none) |
|---|
| 34 | provider (none) (none) (none) (none) (none) (none) |
|---|
| 35 | start (none) (none) (none) (none) starttime (none) |
|---|
| 36 | streamer (none) (none) (none) (none) (none) (none) |
|---|
| 37 | tags (none) category keywords keywords (none) (none) |
|---|
| 38 | title title title (none) title title title |
|---|
| 39 | ============== ============== ============== ============== ============== ============== ============== |
|---|
| 40 | |
|---|
| 41 | All **media:** tags can be embedded in a **media:group** element. A **media:content** element can also act as a container. |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | JWPlayer Namespace |
|---|
| 46 | ------------------ |
|---|
| 47 | |
|---|
| 48 | In order to enable all JW Player file properties for all feed formats, the player contains a **jwplayer** namespace. By inserting this into your feed, properties that are not supported by the feed format itself (such as the **streamer**) can be amended without breaking validation. Any of the entries listed in the above table can be inserted. Here's an example, of a video that uses :ref:`rtmpstreaming`: |
|---|
| 49 | |
|---|
| 50 | .. code-block:: html |
|---|
| 51 | |
|---|
| 52 | <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/"> |
|---|
| 53 | <channel> |
|---|
| 54 | <title>Example RSS feed with jwplayer extensions</title> |
|---|
| 55 | <item> |
|---|
| 56 | <title>Big Buck Bunny</title> |
|---|
| 57 | <jwplayer:file>videos/nPripu9l-60830.mp4</jwplayer:file> |
|---|
| 58 | <jwplayer:streamer>rtmp://myserver.com/myApp/</jwplayer:streamer> |
|---|
| 59 | <jwplayer:duration>34</jwplayer:duration> |
|---|
| 60 | </item> |
|---|
| 61 | </channel> |
|---|
| 62 | </rss> |
|---|
| 63 | |
|---|
| 64 | **Pay attention to the top level tag, which describes the JW Player namespace with the xmlns attribute. This must be available in order to not break validity.** |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | Mixing namespaces |
|---|
| 69 | ----------------- |
|---|
| 70 | |
|---|
| 71 | You can mix **jwplayer** elements with both the regular elements of a feed and elements from the mRSS and iTunes extensions. If multiple elements match the same playlist entry, the elements will be prioritized: |
|---|
| 72 | |
|---|
| 73 | * Elements that are defined by the feed format (e.g. the *enclosure* in RSS) get the lowest priority. |
|---|
| 74 | * Elements defined by the *itunes* namespace rank third. |
|---|
| 75 | * Element defined by the *media* namespace (e.g. *media:content*) rank second. |
|---|
| 76 | * Elements defined by the *jwplayer* extension always gets the highest priority. |
|---|
| 77 | |
|---|
| 78 | This feature allows you to set, for example, a specific video version or streaming features for the JW Player, while other feed aggregators will pick the default content. In the above example feed, we could insert a regular *enclosure* element that points to a download of the video. This would make the feed useful for both the JW Player and text-oriented aggregators such as Feedburner. |
|---|
| 79 | |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | Adding properties |
|---|
| 83 | ----------------- |
|---|
| 84 | |
|---|
| 85 | Certain plugins (e.g. *captions* and *hd*) and providers (:ref:`http <httpstreaming>` and :ref:`rtmp <rtmpstreaming>`) support item-specific configuration options. These are placed inside **jwplayer** tags as well, and are inserted like this: |
|---|
| 86 | |
|---|
| 87 | .. code-block:: xml |
|---|
| 88 | |
|---|
| 89 | <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/"> |
|---|
| 90 | <channel> |
|---|
| 91 | <title>Example RSS feed with playlistitem extensions</title> |
|---|
| 92 | <item> |
|---|
| 93 | <title>First video</title> |
|---|
| 94 | <enclosure url="/files/bunny.flv" type="video/x-flv" length="1192846" /> |
|---|
| 95 | <jwplayer:provider>http</jwplayer:provider> |
|---|
| 96 | <jwplayer:http.startparam>start</jwplayer:http.startparam> |
|---|
| 97 | <jwplayer:captions.file>/files/captions_1.xml</jwplayer:captions.file> |
|---|
| 98 | </item> |
|---|
| 99 | |
|---|
| 100 | <item> |
|---|
| 101 | <title>Second Video</title> |
|---|
| 102 | <enclosure url="/files/bunny.mp4" type="video/mp4" length="1192846" /> |
|---|
| 103 | <jwplayer:provider>http</jwplayer:provider> |
|---|
| 104 | <jwplayer:http.startparam>starttime</jwplayer:http.startparam> |
|---|
| 105 | <jwplayer:captions.file>/files/captions_2.xml</jwplayer:captions.file> |
|---|
| 106 | </item> |
|---|
| 107 | </channel> |
|---|
| 108 | </rss> |
|---|
| 109 | |
|---|
| 110 | Notice that the **<jwplayer:http.startparam>** and **<jwplayer:captions.file>** properties are set differently for each of the playlist items. |
|---|