Fixing the Wordtube video player to stream from playlists

Ever since moving my video to stream from Amazon, I’d been getting a rather annoying error on the otherwise excellent Wordtube plugin with playlists: in essence it refused to play any of the streamed videos on the playlist with the error message ‘playlist could not be loaded due to crossdomain policy restrictions’.

After much playing around, I finally found the likely cause of the problem via this guide to XML playlists on the JW Player website.

In essence, Wordtube was sending the format it uses to store the location for streamed video direct to the JW Player – instead of the format JW Player needed.

The playlist file was including this:

<location>rtmp://video.martintod.org.uk/cfx/st?id=video/LunchtimeObamaReportReloaded.flv</location>

when it needed to include this:

<location>video/LunchtimeObamaReportReloaded.flv</location>
<meta rel="streamer"/>rtmp://video.martintod.org.uk/cfx/st

Fortunately, this was a fairly quick fix. The code for the playlist is in the Wordtube directory at myextractXML.php and you can borrow most of the code to make the necessary change from wordTubeClass::ReturnLocation() in /lib/wordtube.class.php.

I attach a modified version of myextractXML.php here here and you can see the functioning video playlist here.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
This entry was posted in Wordpress. Bookmark the permalink.

One Response to Fixing the Wordtube video player to stream from playlists

  1. Pingback: Updated WordTube code | Martin Tod

Get in Touch

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.