Index: branches/MwEmbedStandAlone/modules/SwarmTransport/mw.EmbedPlayerSwarmVlc.js |
— | — | @@ -11,8 +11,9 @@ |
12 | 12 | var _this = this; |
13 | 13 | var oggHttpSource = this.mediaElement.getSources( 'video/ogg' )[0]; |
14 | 14 | $j( this ).html( |
15 | | - '<object classid="clsid:98FF91C0-A3B8-11DF-8555-0002A5D5C51B" ' + |
16 | | - 'id="' + this.pid + '" events="True" height="' + this.getHeight() + '" width="' + this.getWidth() + '"' + |
| 15 | + '<object classid="clsid:98FF91C0-A3B8-11DF-8555-0002A5D5C51B" ' + |
| 16 | + 'name="' + this.pid + '" ' + |
| 17 | + 'id="' + this.pid + '" events="True" height="' + this.getPlayerHeight() + '" width="' + this.getPlayerWidth() + '"' + |
17 | 18 | '>' + |
18 | 19 | '<param name="ShowDisplay" value="True" />' + |
19 | 20 | '<param name="AutoLoop" value="False" />' + |
— | — | @@ -23,6 +24,11 @@ |
24 | 25 | '</object>' |
25 | 26 | ); |
26 | 27 | setTimeout( function() { |
| 28 | + // make sure the object is the correct size ( IE appears to do weird stuff with object tags ) |
| 29 | + $j( '#' + _this.pid ).css( { |
| 30 | + 'width' : _this.getPlayerWidth(), |
| 31 | + 'height' : _this.getPlayerHeight() |
| 32 | + }) |
27 | 33 | _this.monitor(); |
28 | 34 | }, 100 ); |
29 | 35 | } |
— | — | @@ -33,7 +39,7 @@ |
34 | 40 | mw.log("Error:: EmbedPLayerVlc not defefined "); |
35 | 41 | } else { |
36 | 42 | for( var i in mw.EmbedPlayerVlc ){ |
37 | | - if( !mw.EmbedPlayerSwarmVlc[ i ] ){ |
| 43 | + if( typeof mw.EmbedPlayerSwarmVlc[ i ] == 'undefined' ){ |
38 | 44 | mw.EmbedPlayerSwarmVlc[ i ] = mw.EmbedPlayerVlc[i]; |
39 | 45 | } |
40 | 46 | }; |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -3526,12 +3526,14 @@ |
3527 | 3527 | try{ |
3528 | 3528 | var javaEnabled = navigator.javaEnabled(); |
3529 | 3529 | } catch ( e ){ |
| 3530 | + |
3530 | 3531 | } |
3531 | 3532 | // Some browsers filter out duplicate mime types, hiding some plugins |
3532 | 3533 | var uniqueMimesOnly = $j.browser.opera || $j.browser.safari; |
| 3534 | + |
3533 | 3535 | // Opera will switch off javaEnabled in preferences if java can't be found. |
3534 | 3536 | // And it doesn't register an application/x-java-applet mime type like Mozilla does. |
3535 | | - if ( javaEnabled ) { |
| 3537 | + if ( javaEnabled && ( navigator.appName == 'Opera' ) ) { |
3536 | 3538 | this.players.addPlayer( cortadoPlayer ); |
3537 | 3539 | } |
3538 | 3540 | |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerJava.js |
— | — | @@ -219,7 +219,11 @@ |
220 | 220 | this.getPlayerElement(); |
221 | 221 | this.parent_play(); |
222 | 222 | if ( this.playerElement ) { |
| 223 | + try{ |
223 | 224 | this.playerElement.play(); |
| 225 | + }catch( e ){ |
| 226 | + mw.log("EmbedPlayerJava::Could not issue play request"); |
| 227 | + } |
224 | 228 | } |
225 | 229 | }, |
226 | 230 | |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerVlc.js |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | $j( this ).html( |
40 | 40 | '<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" ' + |
41 | 41 | 'codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" ' + |
42 | | - 'id="' + this.pid + '" events="True" height="' + this.getHeight() + '" width="' + this.getWidth() + '"' + |
| 42 | + 'id="' + this.pid + '" events="True" height="' + this.getPlayerHeight() + '" width="' + this.getPlayerWidth() + '"' + |
43 | 43 | '>' + |
44 | 44 | '<param name="MRL" value="">' + |
45 | 45 | '<param name="ShowDisplay" value="True">' + |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | if ( ( this.playerElement.input.state == 3 ) && ( this.playerElement.input.position != percent ) ) |
131 | 131 | { |
132 | 132 | this.playerElement.input.position = percent; |
133 | | - this.setStatus( 'seeking...' ); |
| 133 | + this.controlBuilder.setStatus( 'seeking...' ); |
134 | 134 | } |
135 | 135 | } else { |
136 | 136 | this.doPlayThenSeek( percent ); |
— | — | @@ -173,10 +173,10 @@ |
174 | 174 | this.getPlayerElement(); |
175 | 175 | if ( !this.playerElement ) |
176 | 176 | return ; |
177 | | - if ( this.playerElement.log ) { |
178 | | - // mw.log( 'state:' + this.playerElement.input.state); |
179 | | - // mw.log('time: ' + this.playerElement.input.time); |
180 | | - // mw.log('pos: ' + this.playerElement.input.position); |
| 177 | + try{ |
| 178 | + mw.log( 'state:' + this.playerElement.input.state); |
| 179 | + mw.log('time: ' + this.playerElement.input.time); |
| 180 | + mw.log('pos: ' + this.playerElement.input.position); |
181 | 181 | if ( this.playerElement.log.messages.count > 0 ) { |
182 | 182 | // there is one or more messages in the log |
183 | 183 | var iter = this.playerElement.log.messages.iterator(); |
— | — | @@ -191,6 +191,7 @@ |
192 | 192 | // clear the log once finished to avoid clogging |
193 | 193 | this.playerElement.log.messages.clear(); |
194 | 194 | } |
| 195 | + |
195 | 196 | var newState = this.playerElement.input.state; |
196 | 197 | if ( this.prevState != newState ) { |
197 | 198 | if ( newState == 0 ) |
— | — | @@ -222,6 +223,8 @@ |
223 | 224 | // current media is playing |
224 | 225 | this.onPlaying(); |
225 | 226 | } |
| 227 | + } catch( e ){ |
| 228 | + mw.log("EmbedPlayerVlc::Monitor error"); |
226 | 229 | } |
227 | 230 | // update the status and check timmer via universal parent monitor |
228 | 231 | this.parent_monitor(); |
— | — | @@ -232,10 +235,10 @@ |
233 | 236 | * @@note: should be localized: |
234 | 237 | */ |
235 | 238 | onOpen: function() { |
236 | | - this.setStatus( "Opening..." ); |
| 239 | + this.controlBuilder.setStatus( "Opening..." ); |
237 | 240 | }, |
238 | 241 | onBuffer: function() { |
239 | | - this.setStatus( "Buffering..." ); |
| 242 | + this.controlBuilder.setStatus( "Buffering..." ); |
240 | 243 | }, |
241 | 244 | onPlay: function() { |
242 | 245 | this.onPlaying(); |
— | — | @@ -300,7 +303,8 @@ |
301 | 304 | pause : function() { |
302 | 305 | this.parent_pause(); // update the interface if paused via native control |
303 | 306 | if ( this.getPlayerElement() ) { |
304 | | - this.playerElement.playlist.togglePause(); |
| 307 | + alter('togglePause:' + document[this.pid].playlist.togglePause ); |
| 308 | + document[this.pid].playlist.togglePause(); |
305 | 309 | } |
306 | 310 | }, |
307 | 311 | |
— | — | @@ -338,17 +342,25 @@ |
339 | 343 | */ |
340 | 344 | fullscreen : function() { |
341 | 345 | if ( this.playerElement ) { |
342 | | - if ( this.playerElement.video ) |
343 | | - this.playerElement.video.toggleFullscreen(); |
344 | | - } |
345 | | - this.parent_fullscreen(); |
| 346 | + if ( this.playerElement.video ){ |
| 347 | + try{ |
| 348 | + this.playerElement.video.toggleFullscreen(); |
| 349 | + } catch ( e ){ |
| 350 | + mw.log("VlcEmbed toggle fullscreen : possible error: " + e); |
| 351 | + } |
| 352 | + } |
| 353 | + } |
346 | 354 | }, |
347 | 355 | |
348 | 356 | /** |
349 | 357 | * Get the embed vlc object |
350 | 358 | */ |
351 | 359 | getPlayerElement : function() { |
352 | | - this.playerElement = $j( '#' + this.pid ).get(0); |
| 360 | + if( $j.browser.msie ){ |
| 361 | + this.playerElement = document[this.pid]; |
| 362 | + }else{ |
| 363 | + this.playerElement = $j( '#' + this.pid ).get(0); |
| 364 | + } |
353 | 365 | return this.playerElement; |
354 | 366 | } |
355 | 367 | }; |