Hi there,
I used to use ustream provider and it was working seamlessly. Recently, I tried adding another ustream channel, but whatever I do, it shows this message:
You have specified an invalid media URL or embed code.
After inspecting ustream's embed code, I found that it has changed sightly, for example, for the channel Tower Bridge the embed code that used to work:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="296" id="utv70610">
<param name="flashvars" value="cid=5488584&autoplay=false"/>
<param name="allowfullscreen" value="true"/>
<param name="allowscriptaccess" value="always"/>
<param name="src" value="http://www.ustream.tv/flash/viewer.swf"/>
<param name="movie" value="http://www.ustream.tv/flash/live/1/1041782?v3=1"/>
<embed flashvars="cid=5488584&autoplay=false" width="480" height="296" allowfullscreen="true" allowscriptaccess="always" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash"></embed> </object>
However, the embed code that ustream generates recently is like:
<object width="480" height="296" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param name="flashvars" value="cid=1041782&autoplay=false"/>
<param name="allowfullscreen" value="true"/>
<param name="allowscriptaccess" value="always"/>
<param name="src" value="http://www.ustream.tv/flash/viewer.swf"/>
<embed flashvars="cid=1041782&autoplay=false" width="480" height="296" allowfullscreen="true" allowscriptaccess="always" src="http://www.ustream.tv/flash/viewer.swf" type="application/x-shockwave-flash"></embed>
</object>
Which didn't work! it seems that ustream's provider code needs to be modified to accommodate to latest ustream changes.
Any clues? thanks in advance.
Comments
Comment #1
amowafy commented+1
same here
Comment #2
Remon commentedSeems there is no video/channel identifier right now but cid/vid attributes.
Use attached patch if you face the same problem.
Comment #3
Remon commentedComment #4
Anonymous (not verified) commentedHello, I tried the above patch but it does'nt work for me. A section of the code looks like so:
/**
* hook emvideo_PROVIDER_extract
* this is called to extract the video code from a pasted URL or embed code.
* @param $embed
* an optional string with the pasted URL or embed code
* @return
* either an array of regex expressions to be tested, or a string with the video code to be used
* if the hook tests the code itself, it should return either the string of the video code (if matched), or an empty array.
* otherwise, the calling function will handle testing the embed code against each regex string in the returned array.
*/
function emvideo_ustream_extract($embed = '') {
// http://www.ustream.tv/recorded/570233
preg_match("'vid=([0-9a-zA-Z]+)'", $embed, $matches);
return $matches[1];
// return array(
// '@ustream\.tv/recorded/([^"\&\?]+)@i',
'@flashvars="loc=%2F&autoplay=false&vid=(\d+)@i',
// );
}
/**
* hook emvideo_PROVIDER_embedded_link($video_code)
* returns a link to view the video at the provider's site
* @param $video_code
* the string containing the video to watch
* @return
* a string containing the URL to view the video at the original provider's site
*/
function emvideo_ustream_embedded_link($video_code) {
return 'http://www.ustream.tv/recorded/' . $video_code;
}
What am I doing wrong? thanks for any support.