Banago Banago - 3 years ago 146
PHP Question

Programmatically Embed Blip.tv Videos

I'm trying to build a php video embedding function that parses the video URL automatically and then produces the right embed code out of that. I'm having trouble with the new blip.tv player because there is no reference the the video in the url that makes sense in the embed code. Here goes an example:

URL: http://blip.tv/NovusSwell/s3w31-hawaii-surfer-groms-with-potato-cannon-spud-gun-5471671

Embed Code:

<embed src="http://blip.tv/play/g8hQgs38GwI" type="application/x-shockwave-flash" width="550" height="327" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" ></embed>


g8hQgs38GwI is the video Id that I cannot guess out of the URL.

Is there a solution to this?

Answer Source

According to Blip.tv Wiki here's what you need to do:

  1. Get the RSS version of the item: http://blip.tv/rss/view/5471671 (Get id from the URL).
  2. Parse what you got at step 1 (RSS is basically an XML file): Using XPath, the copy/paste code is found at /rss/channel/item/media:player
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download