r25485 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25484‎ | r25485 | r25486 >
Date:16:14, 4 September 2007
Author:tstarling
Status:old
Tags:
Comment:
Fixed generic application/ogg support. Downpreffed the two types of generic support since the quality of these miscellaneous plugins tends to be poor.
Modified paths:
  • /trunk/extensions/OggHandler/OggPlayer.js (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/OggPlayer.js
@@ -5,7 +5,7 @@
66
77 // List of players in order of preference
88 // Downpreffed VLC because it crashes my browser all the damn time -- TS
9 - 'players': ['videoElement', 'oggPlugin', 'cortado', 'quicktime-mozilla', 'quicktime-activex', 'vlc-mozilla', 'vlc-activex'],
 9+ 'players': ['cortado', 'quicktime-mozilla', 'quicktime-activex', 'vlc-mozilla', 'vlc-activex', 'oggPlugin', 'videoElement'],
1010
1111 'clientSupports': { 'thumbnail' : true },
1212 'savedThumbs': {},
@@ -21,7 +21,7 @@
2222 * Main entry point: initialise a video player
2323 * Player will be created as a child of the given ID
2424 * There may be multiple players in a document.
25 - * Parameters are: id, videoUrl, width, height, length, linkUrl
 25+ * Parameters are: id, videoUrl, width, height, length, linkUrl, isVideo
2626 */
2727 'init': function ( player, params ) {
2828 elt = document.getElementById( params.id );
@@ -152,14 +152,17 @@
153153 for ( var i = 0; i < navigator.mimeTypes.length; i++) {
154154 var type = navigator.mimeTypes[i].type;
155155 var pluginName = navigator.mimeTypes[i].enabledPlugin ? navigator.mimeTypes[i].enabledPlugin.name : '';
156 - if ( type == 'application/ogg' && pluginName.toLowerCase() == 'vlc multimedia plugin' ) {
157 - this.clientSupports['vlc-mozilla'] = true;
 156+ if ( type == 'application/ogg' ) {
 157+ if ( pluginName.toLowerCase() == 'vlc multimedia plugin' ) {
 158+ this.clientSupports['vlc-mozilla'] = true;
 159+ } else if ( pluginName.indexOf( 'QuickTime' ) > -1 ) {
 160+ this.clientSupports['quicktime-mozilla'] = true;
 161+ } else {
 162+ this.clientSupports['oggPlugin'] = true;
 163+ }
158164 continue;
159165 }
160 - if ( type == 'application/ogg' && pluginName.indexOf( 'QuickTime' ) > -1 ) {
161 - this.clientSupports['quicktime-mozilla'] = true;
162 - continue;
163 - }
 166+
164167 if ( javaEnabled && type == 'application/x-java-applet' ) {
165168 this.clientSupports['cortado'] = true;
166169 continue;

Status & tagging log