Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_baseEmbed.js |
— | — | @@ -1219,7 +1219,7 @@ |
1220 | 1220 | var _this = this; |
1221 | 1221 | |
1222 | 1222 | //if the clip resolution is < 320 don't do fancy onClipDone stuff |
1223 | | - if(this.width<300){ |
| 1223 | + if(this.width < 300){ |
1224 | 1224 | return ; |
1225 | 1225 | } |
1226 | 1226 | this.onClipDone_disp=true; |
— | — | @@ -1426,12 +1426,11 @@ |
1427 | 1427 | doThumbnailHTML:function() |
1428 | 1428 | { |
1429 | 1429 | var _this = this; |
1430 | | - js_log('f:doThumbnailHTML'+ this.thumbnail_disp); |
1431 | | - this.closeDisplayedHTML(); |
1432 | | - this.thumbnail_disp = true; |
1433 | | - |
1434 | | - $j('#mv_embedded_player_'+this.id).html( this.getThumbnailHTML() ); |
| 1430 | + js_log('f:doThumbnailHTML'+ this.thumbnail_disp); |
| 1431 | + this.closeDisplayedHTML(); |
| 1432 | + $j( '#mv_embedded_player_' + this.id ).html( this.getThumbnailHTML() ); |
1435 | 1433 | this.paused = true; |
| 1434 | + this.thumbnail_disp = true; |
1436 | 1435 | }, |
1437 | 1436 | refreshControlsHTML:function(){ |
1438 | 1437 | js_log('refreshing controls HTML'); |
— | — | @@ -1815,14 +1814,14 @@ |
1816 | 1815 | $j('#blackbg_'+sel_id).fadeOut("slow", function(){ |
1817 | 1816 | $j('#blackbg_'+sel_id).remove(); |
1818 | 1817 | }); |
1819 | | - return false;//onclick action return false |
| 1818 | + return false; //onclick action return false |
1820 | 1819 | }, |
1821 | 1820 | selectPlaybackMethod:function(){ |
1822 | 1821 | //get id (in case where we have a parent container) |
1823 | 1822 | var this_id = (this.pc!=null)?this.pc.pp.id:this.id; |
1824 | 1823 | |
1825 | 1824 | var _this=this; |
1826 | | - var out='<span style="color:#FFF;background-color:black;"><blockquote style="background-color:black;">'; |
| 1825 | + var out= '<span style="color:#FFF;background-color:black;"><blockquote style="background-color:black;">'; |
1827 | 1826 | var _this=this; |
1828 | 1827 | //js_log('selected src'+ _this.media_element.selected_source.url); |
1829 | 1828 | $j.each( this.media_element.getPlayableSources(), function(source_id, source){ |
— | — | @@ -1982,7 +1981,7 @@ |
1983 | 1982 | var this_id = (this.pc!=null)?this.pc.pp.id:this.id; |
1984 | 1983 | //js_log('mv_embed:do pause'); |
1985 | 1984 | //(playing) do pause |
1986 | | - this.paused=true; |
| 1985 | + this.paused = true; |
1987 | 1986 | //update the ctrl "paused state" |
1988 | 1987 | $j("#mv_play_pause_button_" + this_id).attr({ |
1989 | 1988 | 'class':'play_button' |
— | — | @@ -2006,10 +2005,11 @@ |
2007 | 2006 | }else{ |
2008 | 2007 | this.pause(); |
2009 | 2008 | } |
| 2009 | + |
2010 | 2010 | //reset the currentTime: |
2011 | 2011 | this.currentTime=0; |
2012 | 2012 | //check if thumbnail is being displayed in which case do nothing |
2013 | | - if(this.thumbnail_disp){ |
| 2013 | + if( this.thumbnail_disp ){ |
2014 | 2014 | //already in stooped state |
2015 | 2015 | js_log('already in stopped state'); |
2016 | 2016 | }else{ |
— | — | @@ -2019,6 +2019,7 @@ |
2020 | 2020 | this.setSliderValue(0); |
2021 | 2021 | this.setStatus( this.getTimeReq() ); |
2022 | 2022 | } |
| 2023 | + |
2023 | 2024 | //make sure the big playbutton is has click action: |
2024 | 2025 | $j('#big_play_link_' + _this.id).unbind('click').click(function(){ |
2025 | 2026 | $j('#' +_this.id).get(0).play(); |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_javaEmbed.js |
— | — | @@ -79,22 +79,22 @@ |
80 | 80 | }else{*/ |
81 | 81 | //load directly in the page.. |
82 | 82 | // (media must be on the same server or applet must be signed) |
83 | | - return ''+ |
| 83 | + var appplet_code = ''+ |
84 | 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"+ |
85 | 85 | '<param name="url" value="'+this.media_element.selected_source.src+'" /> ' + "\n"+ |
86 | 86 | '<param name="local" value="false"/>'+ "\n"+ |
87 | 87 | '<param name="keepaspect" value="true" />'+ "\n"+ |
88 | 88 | '<param name="video" value="true" />'+"\n"+ |
| 89 | + '<param name="showStatus" value="hide" />' + "\n"+ |
89 | 90 | '<param name="audio" value="true" />'+"\n"+ |
90 | 91 | '<param name="seekable" value="true" />'+"\n"+ |
91 | 92 | '<param name="duration" value="'+this.duration+'" />'+"\n"+ |
92 | 93 | '<param name="bufferSize" value="200" />'+"\n"+ |
93 | 94 | '</applet>'; |
94 | | - |
95 | | - |
| 95 | + |
96 | 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 ) { |
| 97 | + // Doesn't work in MSIE or Safari/Mac or Opera 9.5 |
| 98 | + if ( embedTypes.mozilla ) { |
99 | 99 | var iframe = document.createElement( 'iframe' ); |
100 | 100 | iframe.setAttribute( 'width', params.width ); |
101 | 101 | iframe.setAttribute( 'height', playerHeight ); |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | iframe.setAttribute( 'frameborder', 0 ); |
104 | 104 | iframe.setAttribute( 'marginWidth', 0 ); |
105 | 105 | iframe.setAttribute( 'marginHeight', 0 ); |
106 | | - iframe.setAttribute( 'id', 'cframe_'+ this.id) |
| 106 | + iframe.setAttribute( 'id', 'cframe_' + this.id) |
107 | 107 | elt.appendChild( iframe ); |
108 | 108 | var newDoc = iframe.contentDocument; |
109 | 109 | newDoc.open(); |
— | — | @@ -110,9 +110,7 @@ |
111 | 111 | newDoc.close(); // spurious error in some versions of FF, no workaround known |
112 | 112 | } else { |
113 | 113 | return appplet_code; |
114 | | - } */ |
115 | | - |
116 | | - //} |
| 114 | + } |
117 | 115 | }, |
118 | 116 | postEmbedJS:function(){ |
119 | 117 | //reset logged domain error flag: |
— | — | @@ -145,7 +143,11 @@ |
146 | 144 | }, |
147 | 145 | //get java cortado embed object |
148 | 146 | getJCE:function(){ |
149 | | - this.jce = $j('#'+this.pid).get(0); |
| 147 | + if ( embedTypes.mozilla ) { |
| 148 | + this.jce = window.frames['cframe_' + this.id ].document.getElementById( this.pid ); |
| 149 | + }else{ |
| 150 | + this.jce = $j('#'+this.pid).get( 0 ); |
| 151 | + } |
150 | 152 | /*if( ! mv_java_iframe ){ |
151 | 153 | |
152 | 154 | }else{ |
— | — | @@ -161,8 +163,22 @@ |
162 | 164 | return false; |
163 | 165 | } */ |
164 | 166 | }, |
| 167 | + doThumbnailHTML:function(){ |
| 168 | + //empty out player html (jquery with java applets does not work) : |
| 169 | + var pelm = document.getElementById('mv_embedded_player_' + this.id ); |
| 170 | + pelm.innerHTML = ''; |
| 171 | + this.parent_doThumbnailHTML(); |
| 172 | + }, |
| 173 | + play:function(){ |
| 174 | + this.getJCE(); |
| 175 | + this.parent_play(); |
| 176 | + if( this.jce ) |
| 177 | + this.jce.doPlay(); |
| 178 | + }, |
165 | 179 | pause:function(){ |
| 180 | + this.getJCE(); |
166 | 181 | this.parent_pause(); |
167 | | - this.stop(); |
| 182 | + if( this.jce ) |
| 183 | + this.jce.doPause(); |
168 | 184 | } |
169 | 185 | } |
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/mv_vlcEmbed.js |
— | — | @@ -272,7 +272,7 @@ |
273 | 273 | }, |
274 | 274 | pause : function(){ |
275 | 275 | this.parent_pause(); //update the inteface if paused via native control |
276 | | - if(this.vlc){ |
| 276 | + if( this.vlc ){ |
277 | 277 | this.vlc.playlist.togglePause(); |
278 | 278 | } |
279 | 279 | }, |