Commit 639f617e8d4a71cb418836c0b4d60b31e553b857

support for livevideo.com added
  
1<?php
2class livevideo {
3
4 /*
5 * constructor
6 */
7 function livevideo() {
8 }
9
10 /*
11 * @return
12 * html to render guba videos
13 * @url
14 * string url to video
15 * @options
16 * array containing video height, width, autoplay etc
17 */
18 function livevideo_html(&$url, $options = array()) {
19 //http://www.livevideo.com/video/9E77A4AC44DA41848E64A7949009C94E/flintoff-shows-off-his-koala-b.aspx
20 //http://www.livevideo.com/flvplayer/embed/9E77A4AC44DA41848E64A7949009C94E"
21
22 $url1=explode('/', $url);
23 $url= "http://livevideo.com/flvplayer/embed/".$url1[4];
24
25
26
27 $div_id = isset($options['div_id']) ? $options['div_id'] : 'guba';
28 $height = isset($options['height']) ? $options['height'] : '300';
29 $width = isset($options['width']) ? $options['width'] : '350';
30 $id = isset($options['id']) ? $options['id'] : 'youtube';
31 $fullscreen_value = isset($options['fullscreen']) ? $options['fullscreen'] : "false" ;
32
33 $output = <<<FLASH
34 <div id="$div_id">
35 <object width="$width" height="$height">
36 <param name="movie" value="$url"></param>
37 <param name="allowFullScreen" value="true"></param>
38 <param name="allowscriptaccess" value="always"></param>
39 <embed src="$url" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
40 </object>
41 </div>
42FLASH;
43 return $output;
44 }
45}