Playlist

About

The StreamOne Player Playlist is based on the XSPF format, which is an xml based playlist format. Because of specific requirements we extended the XSPF format with the S1-namespace, adding support for multiple labeled location, related content, social media sharing, logo overlay.

Part 1: Header

First, construct the XSPF headers and open the playlist node:

<?xml version="1.0" encoding="UTF-8"?>
   <playlist version="1" xmlns="http://xspf.org/ns/0/" xmlns:s1="http://static.streamone.nl/player/ns/0">

Part 2: trackList

After opening the <playlist> node, we open the trackList and add all playlist items (1 or more) to it. The player (both Flash and HTML5) will atomatically decide the best resolution based on the s1:height parameter. The s1:default attribute can override player default behavior:

<trackList>
   <track>
      <title>Clip title</title>
      <annotation>Short description</annotation>
      <image>http://img.streamone.nl/img/account=jmC3PG/item=9hqngireCM/size=920x518/image.jpg</image>
      <location s1:label="270p" s1:height="228">http://media.streamone.nl/stream/account=jmC3PG/item=9hqngireCM/file=j6c87KPbK5/cid=51cd99f5489ca/zvkzdgqxhvycbllq1mfdlcjpmozorcyk-h264bp-378k.mp4</location>
      <location s1:label="360p" s1:height="304">http://media.streamone.nl/stream/account=jmC3PG/item=9hqngireCM/file=YyR37YgWn9/cid=51cd99f5489ca/zvkzdgqxhvycbllq1mfdlcjpmozorcyk-h264bp-768k.mp4</location>
      <location s1:label="480p" s1:height="406" s1:default="1">http://media.streamone.nl/stream/account=jmC3PG/item=9hqngireCM/file=Z8q2lR6sh7/cid=51cd99f5489ca/zvkzdgqxhvycbllq1mfdlcjpmozorcyk-h264bp-1478k.mp4</location>
      <location s1:label="720p" s1:height="608">http://media.streamone.nl/stream/account=jmC3PG/item=9hqngireCM/file=55NCD68m7k/cid=51cd99f5489ca/zvkzdgqxhvycbllq1mfdlcjpmozorcyk-h264bp-2628k.mp4</location>

After loading the track locations, you can add social sharing information about the track, within the extension node and the s1:sharing node:

<extension application="http://static.streamone.nl/player/0">
   <s1:sharing url="http://content.streamone.nl/og/jmC3PG/9hqngireCM" thumbnail="http://img.streamone.nl/img/account=jmC3PG/item=9hqngireCM/image.jpg">
      <s1:title>Salt</s1:title>
      <s1:description></s1:description>
      <s1:embedCode><![CDATA[<iframe width="640" height="360" src="http://content.streamone.nl/embedframe?account=jmC3PG&amp;item=9hqngireCM&amp;player=&amp;width=640&amp;height=360" frameborder="0" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe>]]></s1:embedCode>
   </s1:sharing>

It’s also possible to load an overlay image (e.g. a logo) and specify it’s locatoin using the right/top/width/height attributes:

<s1:logo
   image="http://content.streamone.nl/skin/s1logo.png"
   url="http://www.streamone.nl/"
   fullscreenOnly="0"
   right="2%" top="4%" width="10%" height="10%" maintainAspectRatio="1"
/>

We’re done adding location, sharing and logo to this track, so we’ll close the extension and the track nodes that were still open in this example. Because we only have one track in this example, we’ll close the trackList too:

      </extension>
   </track>
</trackList>

Part 4: Google IMA Plugin

The Google IMA Plugin should be loaded from within the <extensions> node in the XSPF Playlist. If there is information about related content, you’ll have to add the Google IMA plugin before or after the <s1:related> node:

<extension application="http://static.streamone.nl/player/0">
   <s1:plugin
      s1:type="google_ima"
      s1:adType="video"
      s1:adTagUrl="http://pubads.g.doubleclick.net/full-url-to-your-ad"
      s1:disableCompanionAds="false"
   />
</extension>

Part 5: The End

Finally, we end the <playlist> node:

</playlist>