Index: trunk/extensions/OggHandler/OggHandler.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | ini_get( 'include_path' ) ); |
19 | 19 | |
20 | 20 | // Bump this when updating OggPlayer.js to help update caches |
21 | | -$wgOggScriptVersion = '3'; |
| 21 | +$wgOggScriptVersion = '4'; |
22 | 22 | |
23 | 23 | $wgExtensionMessagesFiles['OggHandler'] = "$oggDir/OggHandler.i18n.php"; |
24 | 24 | $wgParserOutputHooks['OggHandler'] = array( 'OggHandler', 'outputHook' ); |
Index: trunk/extensions/OggHandler/OggPlayer.js |
— | — | @@ -123,7 +123,15 @@ |
124 | 124 | // navigator.javaEnabled() only tells us about preferences, we need to |
125 | 125 | // search navigator.mimeTypes to see if it's installed |
126 | 126 | var javaEnabled = navigator.javaEnabled(); |
| 127 | + var uniqueMimesOnly = ( navigator.appName == 'Opera' ); |
| 128 | + var invisibleJava = ( navigator.appName == 'Opera' ); |
127 | 129 | |
| 130 | + // Opera will switch off javaEnabled in preferences if java can't be found. |
| 131 | + // And it doesn't register an application/x-java-applet mime type like Mozilla does. |
| 132 | + if ( invisibleJava && javaEnabled ) { |
| 133 | + this.clientSupports['cortado'] = true; |
| 134 | + } |
| 135 | + |
128 | 136 | // ActiveX plugins |
129 | 137 | // VLC |
130 | 138 | if ( this.testActiveX( 'VideoLAN.VLCPlugin.2' ) ) { |
— | — | @@ -171,13 +179,12 @@ |
172 | 180 | } |
173 | 181 | continue; |
174 | 182 | } |
175 | | - |
176 | 183 | if ( javaEnabled && type == 'application/x-java-applet' ) { |
177 | 184 | this.clientSupports['cortado'] = true; |
178 | 185 | continue; |
179 | 186 | } |
180 | | - // Hack for Opera |
181 | | - if ( type == 'application/x-vlc-plugin' ) { |
| 187 | + if ( uniqueMimesOnly && type == 'application/x-vlc-plugin' ) { |
| 188 | + // Client does not define multiple mimeType entries for application/ogg |
182 | 189 | this.clientSupports['vlc-mozilla'] = true; |
183 | 190 | } |
184 | 191 | } |