Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Youtube HQ Playlist - Stopped Working in 4.3

2 replies [Last post]

Take a look at the following 2 examples: -

http://www.loweringprices.com/2versions/index_4-2.php
http://www.loweringprices.com/2versions/index_4-3.php

Both use the method discussed at http://www.longtailvideo.com/support/forum/Setup-Problems/13704/YouTube-streaming-stopped-working- to stream Youtube High Quality content.

The first uses player version 4.2. the second 4.3. Apart from that all other code is exactly the same: -

Inclusion code: -

var so = new SWFObject("mediaplayer/player_4-x.swf", "mediaplayer", "340", "361", "9.0.115.0", "#dbdee5", true);
// need this next line for local testing, it's optional if your swf is on the same domain as your html page
so.addParam("allowscriptaccess", "always");
so.addParam("menu", "false");
so.addParam('allowfullscreen','true');
so.addVariable('playlist','bottom');
so.addVariable('playlistsize','150'); // two and a half tracks
so.addVariable('file','http://www.loweringprices.com/2versions/video_playlist.xml');
so.addVariable('type','xml');
so.addVariable('autoscroll','true');
so.addVariable('autostart','true');
so.addVariable('plugins', 'accessibility');
so.write("flashcontent");

playlist: see http://www.loweringprices.com/2versions/video_playlist.xml

Note: for some reason I had to add <meta rel="captions">none</meta> otherwise the captions from the first track were included in every track.

I was using 4.2 but experienced the problem discussed at http://www.longtailvideo.com/support/forum/Setup-Problems/14296/Captions-don-t-display-first-time-vi... - i.e. captions not displaying on first display. So in an effort to fix this I upgraded to player v4.3 and as you can see it stopped working altogether!

Can anyone shed any light on this? As I said, nothing has changed except the player version.

Please review the v4.x player supported flashvars here:

      http://developer.longtailvideo.com/trac/wiki/FlashVars

There is no type of xml. It is not necessary to specify a type when the file flashvar value is a URI for a playlist. You can still specify a type for each media file in the playlist, if necessary. The type must be a supported type in the correct format for the playlist format that you are using.

There is no autoscroll flashvar.

  var so = new SWFObject('mediaplayer/player_4-x.swf', 'mediaplayer', '340', '361', '9.0.115.0', '#dbdee5', true);
  // need this next line for local testing, it's optional if your swf is on the same domain as your html page
      so.addParam('allowscriptaccess',    'always');
      so.addParam('menu',                 'false');
      so.addParam('allowfullscreen',      'true');
      so.addVariable('playlist',          'bottom');
      so.addVariable('playlistsize',      '150'); // two and a half tracks
      so.addVariable('file',              'http://www.loweringprices.com/2versions/video_playlist.xml');
      <strike>so.addVariable('type',              'xml');</strike>
      <strike>so.addVariable('autoscroll',        'true');</strike>
      so.addVariable('autostart',         'true');
      so.addVariable('plugins',           'accessibility');
      so.write('flashcontent');
<?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
  <title>YouTube High Quality test</title>
  <creator>Marc J</creator>
  <trackList>
    <track>
      <title>The T-Mobile Flashmob</title>
      <annotation>Example of High Quality video (fmt=18) on YouTube.</annotation>
      <meta rel="captions">http://www.loweringprices.com/2versions/t-mobile_captions.xml</meta>
      <location>http://www.loweringprices.com/2versions/mediaplayer/youtubefix.php?videoid=VQ3d3KigPQM&format=18</location>
      <image>http://img.youtube.com/vi/VQ3d3KigPQM/2.jpg</image>
      <strong><meta rel="type">video</meta></strong>
      <duration>161</duration>
</track>
    <track>
      <title>Where the Hell is Matt?</title>
      <annotation>Just an example of an HD video on YouTube.</annotation>
      <meta rel="captions">none</meta>
      <location>http://www.loweringprices.com/2versions/mediaplayer/youtubefix.php?videoid=zlfKdbWwruY&format=22</location>
      <image>http://img.youtube.com/vi/zlfKdbWwruY/2.jpg</image>
      <strong><meta rel="type">video</meta></strong>
      <duration>268</duration>
</track>
    <track>
      <title>Britney Spears - Womanizer</title>
      <annotation>Another example of an HD video on YouTube.</annotation>
      <meta rel="captions">none</meta>
      <location>http://www.loweringprices.com/2versions/mediaplayer/youtubefix.php?videoid=o68_8pVOtiU&format=22</location>
      <image>http://img.youtube.com/vi/o68_8pVOtiU/2.jpg</image>
      <strong><meta rel="type">video</meta></strong>
      <duration>234</duration>
</track>
    <track>
      <title>Super Speedway</title>
      <annotation>Another example of an HD video on YouTube.</annotation>
      <meta rel="captions">none</meta>
      <location>http://www.loweringprices.com/2versions/mediaplayer/youtubefix.php?videoid=7RkFHUmj8YM&format=22</location>
      <image>http://img.youtube.com/vi/7RkFHUmj8YM/2.jpg</image>
      <strong><meta rel="type">video</meta></strong>
      <duration>120</duration>
</track>
    <track>
      <title>Islands of the Great Barrier Reef</title>
      <annotation>Another example of a High Quality (fmt=18) YouTube video.</annotation>
      <meta rel="captions">none</meta>
      <location>http://www.loweringprices.com/2versions/mediaplayer/youtubefix.php?videoid=Gsxm25cIAzM&format=18</location>
      <image>http://img.youtube.com/vi/Gsxm25cIAzM/2.jpg</image>
      <strong><meta rel="type">video</meta></strong>
      <duration>66</duration>
</track>
  </trackList>
</playlist>

Excellent! Thank-you very much!