|
Here is the fix to get Blip.tv back working with HDFLVPlayer
Steps:
1. Edit the video.php file located (sites/all/modules/hdflvplayer/hdflvplayer/videourl.php)
2. Locate code:
<code> } elseif(preg_match('/http:\/\/(.*?)blip\.tv\/file\/[0-9]+/', $location, $vresult)) { </code>
replace with:
<code> } elseif(preg_match('/http:\/\/(.*?)blip\.tv\/[a-z0-9\-\_]+\/[a-z0-9\-\_]+\-[0-9]+/', $location, $vresult)) { </code>
Note: the change on the regex is to accomodate the new url format. With this change the type of video is back so the module now can identify when the video is coming from Blip.tv
3. Locate code:
<code> preg_match('/http:\/\/(.*?)blip\.tv\/file\/get\/(.*?)\.flv/', $newInfo, $result);
$vid_location[0] = urldecode($result[0]); </code>
replace with:
<code> $newurl = explode('-', $url); $source = 'http://blip.tv/rss/flash/'.$newurl[count($newurl)-1]; $xmlstr = file_get_contents($source); $xml = simplexml_load_string($xmlstr);
$vid_location[0] = urldecode($xml->channel->item->enclosure['url']); </code>
Note: the reason for the code change is because the flv file path is not shown anymore on the video page source code, so to work around this issue I use their RSS feed where the flv is always shown.
Thank you all for this module and I hope that someone can benefit from this fix. The only think to fix now will be the images if you want to pull the thumbnails and description from Blip.tv.
|