Index: branches/embed_media/phase3/skins/common/embed_media.js |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | //if they don't have annodex & on a win/linux look for java/plugin
|
7 | 7 | //if on mac force java plugin.
|
8 | 8 | */
|
9 | | -
|
| 9 | +var wiki_web_path = 'http://metavid.ucsc.edu/wiki_dev/phase3/';
|
10 | 10 | //some client detection code:
|
11 | 11 | var agt=navigator.userAgent.toLowerCase();
|
12 | 12 | var is_major = parseInt(navigator.appVersion);
|
— | — | @@ -119,6 +119,9 @@ |
120 | 120 | //show the controls:
|
121 | 121 | document.getElementById("cnt_" + opt['target']).style.display='inline';
|
122 | 122 |
|
| 123 | + //set the media url to the m3u file:
|
| 124 | + opt['media_url']=wiki_web_path + 'embed/m3u.php?media_url='+opt['media_url'];
|
| 125 | + //alert('url:'+opt['media_url']);
|
123 | 126 | setTimeout('run_vlc(\''+opt['target']+'\',\''+opt['media_url']+'\')', 200);
|
124 | 127 | }
|
125 | 128 |
|
— | — | @@ -137,7 +140,6 @@ |
138 | 141 | document.video_Launch_of_Skylab_ogg.play();*/
|
139 | 142 | }
|
140 | 143 | function jre_embed(opt){
|
141 | | -
|
142 | 144 | //need to build an iframe include only really deal with java security issues
|
143 | 145 | //@todo make sure the embed code is coming from the same server as the media
|
144 | 146 | var iframe = document.createElement("iframe");
|
— | — | @@ -156,9 +158,9 @@ |
157 | 159 |
|
158 | 160 | //for now use jcraft for audio:
|
159 | 161 | if(opt['stream_type']=='audio'){
|
160 | | - var iframe_src = 'http://metavid.ucsc.edu/wiki_dev/phase3/embed/jorbis_embed.php';
|
| 162 | + var iframe_src = wiki_web_path + 'embed/jorbis_embed.php';
|
161 | 163 | }else{
|
162 | | - var iframe_src = 'http://metavid.ucsc.edu/wiki_dev/phase3/embed/cortado_embed.php';
|
| 164 | + var iframe_src = wiki_web_path + 'embed/cortado_embed.php';
|
163 | 165 | }
|
164 | 166 | iframe_src+= "?media_url=" + opt['media_url'];
|
165 | 167 | iframe_src+= "&stream_type=" + opt['stream_type'];
|
Index: branches/embed_media/phase3/includes/Wiki.php |
— | — | @@ -175,8 +175,7 @@ |
176 | 176 | if( NS_MEDIA == $title->getNamespace() || NS_EMBED == $title->getNamespace() ) { |
177 | 177 | // FIXME: where should this go? |
178 | 178 | $title = Title::makeTitle( NS_IMAGE, $title->getDBkey() ); |
179 | | - } |
180 | | - |
| 179 | + } |
181 | 180 | switch( $title->getNamespace() ) { |
182 | 181 | case NS_IMAGE: |
183 | 182 | return new ImagePage( $title ); |
Index: branches/embed_media/phase3/embed/m3u.php |
— | — | @@ -0,0 +1,21 @@ |
| 2 | +<?
|
| 3 | +//generates a m3u file so that vlc buffers clips.
|
| 4 | +if(isset($_GET['media_url'])){
|
| 5 | + $media_url=$_GET['media_url'];
|
| 6 | +}else{
|
| 7 | + //@@TODO media_url = media not found .ogg
|
| 8 | + $media_url='';
|
| 9 | +}
|
| 10 | +//how much to buffer (for now 5 seconds):
|
| 11 | +$cache_len = 5000;
|
| 12 | +
|
| 13 | +
|
| 14 | +//set out the m3u file as so that VLC will know to handle it:
|
| 15 | +header('Content-Type: application/x-videolan-vlc');
|
| 16 | +?>#EXTM3U
|
| 17 | +
|
| 18 | +#EXTVLCOPT:http-caching=<?=$cache_len?>
|
| 19 | +#
|
| 20 | +# METAVID playlist file:
|
| 21 | +#
|
| 22 | +<?=$media_url?> |
\ No newline at end of file |
Property changes on: branches/embed_media/phase3/embed |
___________________________________________________________________ |
Modified: svn:ignore |
1 | 23 | - _notes |
2 | 24 | + _notes |
cortado-ovt-debug-0.2.0.1.jar |
cortado-ovt-stripped-0.2.0.jar |
cortado-ovt.jar |