r50502 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50501‎ | r50502 | r50503 >
Date:00:20, 12 May 2009
Author:dale
Status:deferred
Tags:
Comment:
java cortado updates
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/testing_page.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_javaEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_nativeEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_vlcEmbed.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/testing_page.php
@@ -18,7 +18,7 @@
1919 <table border="1" cellpadding="6" width="600">
2020 <tr>
2121 <td valign="top">
22 - <playlist src="fresh_smil_load.php" type="audio/ogg"></playlist>
 22+ <video src="http://192.168.1.235/wiki/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_eclipse.ogg" poster="sample_eclipse.jpg" duration="7"></video>
2323 </td>
2424 <td valign="top"><b>Test embed</b><br />
2525 </td>
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_nativeEmbed.js
@@ -97,8 +97,8 @@
9898 this.currentTime = this.currentTime - this.startOffset;
9999
100100 //js_log('this.currentTime: ' + this.currentTime );
101 - //once currentTime is updated call parent_monitor
102 - this.parent_monitor();
 101+ //once currentTime is updated call parent_monitor
 102+ this.parent_monitor();
103103 },
104104 /*
105105 * native callbacks for the video tag:
@@ -107,6 +107,7 @@
108108 js_log('f:oncanplaythrough');
109109 },
110110 onloadedmetadata: function(){
 111+ this.getVID();
111112 js_log('f:onloadedmetadata metadata ready (update duration)');
112113 //update duration if not set (for now trust the getDuration more than this.vid.duration
113114 this.duration = ( this.getDuration() ) ?this.getDuration() : this.vid.duration;
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_baseEmbed.js
@@ -1053,7 +1053,6 @@
10541054 $j('#mv_embedded_player_'+_this.id).html(embed_code);
10551055 });
10561056 },
1057 - /* todo abstract out onClipDone chain of functions and merge with mvTextInterface */
10581057 onClipDone:function(){
10591058 js_log('base:onClipDone');
10601059 //stop the clip (load the thumbnail etc)
@@ -1183,7 +1182,7 @@
11841183 }
11851184 }else{
11861185 js_log('no annotative track found');
1187 - $j('#liks_info_'+this.id).html('no metadata found for next, previous links');
 1186+ $j('#liks_info_'+this.id).html('no metadata found for related links');
11881187 }
11891188 //query current request time +|- 60s to get prev next speech links.
11901189 },
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_javaEmbed.js
@@ -22,7 +22,8 @@
2323 this.getDuration();
2424 //if still unset set to an arbitrary time 60 seconds:
2525 if(!this.duration)this.duration=60;
26 - if( mv_java_iframe ){
 26+
 27+ /*if( mv_java_iframe && parseUri(document.URL).host != parseUri(document.URL).host){
2728 //make sure iframe and embed path match (java security model)
2829 var iframe_src='';
2930 var src = this.getURI( this.seek_time_sec );
@@ -63,11 +64,11 @@
6465 iframe_src+=parent_domain;
6566
6667 //check for the mvMsgFrame
67 - /*if($j('#mvMsgFrame').length == 0){
68 - js_log('appened mvMsgFrame');
69 - //add it to the dom: (sh
70 - $j('body').prepend( '<iframe id="mvMsgFrame" width="0" height="0" scrolling=no marginwidth=0 marginheight=0 src="#none"></iframe>' );
71 - }*/
 68+ //if($j('#mvMsgFrame').length == 0){
 69+ // js_log('appened mvMsgFrame');
 70+ // //add it to the dom: (sh
 71+ // $j('body').prepend( '<iframe id="mvMsgFrame" width="0" height="0" scrolling=no marginwidth=0 marginheight=0 src="#none"></iframe>' );
 72+ //}
7273 js_log("about to set iframe source and embed code");
7374 this.iframe_src = iframe_src;
7475 var embed_code = '<iframe id="iframe_' + this.pid + '" width="'+this.width+'" height="'+this.height+'" '+
@@ -75,11 +76,11 @@
7677 'src = "'+ this.iframe_src + '"></iframe>';
7778 js_log('going to embed: ' + embed_code);
7879 return embed_code;
79 - }else{
 80+ }else{*/
8081 //load directly in the page..
8182 // (media must be on the same server or applet must be signed)
8283 return ''+
83 - '<applet id="'+this.pid+'" code="com.fluendo.player.Cortado.class" archive="'+mv_embed_path+'binPlayer/cortado/cortado-wmf-r46643.jar" width="'+this.width+'" height="'+this.height+'"> '+ "\n"+
 84+ '<applet id="'+this.pid+'" code="com.fluendo.player.Cortado.class" archive="'+mv_embed_path+'binPlayers/cortado/cortado-wmf-r46643.jar" width="'+this.width+'" height="'+this.height+'"> '+ "\n"+
8485 '<param name="url" value="'+this.media_element.selected_source.src+'" /> ' + "\n"+
8586 '<param name="local" value="false"/>'+ "\n"+
8687 '<param name="keepaspect" value="true" />'+ "\n"+
@@ -89,7 +90,29 @@
9091 '<param name="duration" value="'+this.duration+'" />'+"\n"+
9192 '<param name="bufferSize" value="200" />'+"\n"+
9293 '</applet>';
93 - }
 94+
 95+
 96+ // Wrap it in an iframe to avoid hanging the event thread in FF 2/3 and similar
 97+ // Doesn't work in MSIE or Safari/Mac or Opera 9.5
 98+ /*if ( embedTypes.mozilla ) {
 99+ var iframe = document.createElement( 'iframe' );
 100+ iframe.setAttribute( 'width', params.width );
 101+ iframe.setAttribute( 'height', playerHeight );
 102+ iframe.setAttribute( 'scrolling', 'no' );
 103+ iframe.setAttribute( 'frameborder', 0 );
 104+ iframe.setAttribute( 'marginWidth', 0 );
 105+ iframe.setAttribute( 'marginHeight', 0 );
 106+ iframe.setAttribute( 'id', 'cframe_'+ this.id)
 107+ elt.appendChild( iframe );
 108+ var newDoc = iframe.contentDocument;
 109+ newDoc.open();
 110+ newDoc.write( '<html><body>' + appplet_code + '</body></html>' );
 111+ newDoc.close(); // spurious error in some versions of FF, no workaround known
 112+ } else {
 113+ return appplet_code;
 114+ } */
 115+
 116+ //}
94117 },
95118 postEmbedJS:function(){
96119 //reset logged domain error flag:
@@ -98,24 +121,33 @@
99122 this.monitor();
100123 },
101124 monitor:function(){
102 - if( this.getJCE() ) {
 125+ this.getJCE()
 126+ if(this.jce){
103127 try{
104128 //java reads "playtime" not ogg media time.. so add the start_offset or seek_offset
105129 //js_log(' ct: ' + this.jce.getPlayPosition() + ' so:' + this.start_offset + ' st:' + this.seek_time_sec);
 130+ if(!this.start_offset)
 131+ this.start_offset = 0;
 132+
106133 this.currentTime = (this.seek_time_sec==0)?
107134 this.jce.getPlayPosition() + this.start_offset :
108135 this.jce.getPlayPosition() + this.seek_time_sec ;
109136 }catch (e){
110137 ///js_log('could not get time from jPlayer: ' + e);
111 - }
112 - }
 138+ }
 139+ if( this.currentTime < 0){
 140+ //probably reached clip end
 141+ this.onClipDone();
 142+ }
 143+ }
113144 //once currentTime is updated call parent_monitor
114145 this.parent_monitor();
115146 },
116147 //get java cortado embed object
117148 getJCE:function(){
118 - if( ! mv_java_iframe ){
119 - this.jce = $j('#'+this.pid).get(0);
 149+ this.jce = $j('#'+this.pid).get(0);
 150+ /*if( ! mv_java_iframe ){
 151+
120152 }else{
121153 if( $j('#iframe_' + this.pid ).length > 0 )
122154 try{
@@ -127,8 +159,7 @@
128160 }
129161 else
130162 return false;
131 - }
132 - return this.jce;
 163+ } */
133164 },
134165 pause:function(){
135166 this.parent_pause();
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedVideo/mv_vlcEmbed.js
@@ -194,12 +194,8 @@
195195 {
196196 js_log('setting duration to ' + this.vlc.input.length /1000);
197197 this.media_element.selected_source.setDuration( this.vlc.input.length /1000);
 198+ this.duration = this.vlc.input.length /1000;
198199 }
199 -
200 - this.duration = ( this.getDuration() ) ? this.getDuration() : this.vlc.input.length /1000;
201 - /*if(this.duration!=this.vlc.input.length /1000){
202 - this.duration = this.vlc.input.length /1000;
203 - }*/
204200 //update the currentTime attribute
205201 if( this.media_element.selected_source.timeFormat =='anx' ){
206202 this.currentTime = this.vlc.input.time/1000;
@@ -212,7 +208,7 @@
213209 }else{
214210 this.currentTime = (this.vlc.input.time/1000) + this.media_element.selected_source.start_offset;
215211 }
216 - //vlc uses original time:
 212+ //vlc uses original time update startOffset if playing chop stream:
217213 if( this.startOffset )
218214 this.currentTime = this.currentTime - this.startOffset;
219215 //updates hanlded by parent monitor and currentTime

Status & tagging log