Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | mediaWiki.loader.using( dependencySet, function(){ |
104 | 104 | mw.processEmbedPlayers( playerSelect, readyCallback ); |
105 | 105 | }, function( e ){ |
106 | | - throw new Error( 'Error loading EmbedPlayer dependency set' ); |
| 106 | + throw new Error( 'Error loading EmbedPlayer dependency set: ' + e.message ); |
107 | 107 | }); |
108 | 108 | }; |
109 | 109 | |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.MediaSource.js |
— | — | @@ -106,7 +106,8 @@ |
107 | 107 | // Set default URLTimeEncoding if we have a time url: |
108 | 108 | // not ideal way to discover if content is on an oggz_chop server. |
109 | 109 | // should check some other way. |
110 | | - var pUrl = new mw.Uri ( this.src ); |
| 110 | + var pUrl = new mw.Uri ( mw.absoluteUrl( this.src) ); // mw.Uri only handles full urls |
| 111 | + |
111 | 112 | if ( typeof pUrl.query[ 't' ] != 'undefined' ) { |
112 | 113 | this.URLTimeEncoding = true; |
113 | 114 | } |
— | — | @@ -308,7 +309,7 @@ |
309 | 310 | |
310 | 311 | // Return title based on file name: |
311 | 312 | try{ |
312 | | - var fileName = new mw.Uri( this.getSrc() ).path.split('/').pop(); |
| 313 | + var fileName = new mw.Uri( mw.absoluteUrl( this.getSrc() ) ).path.split('/').pop(); |
313 | 314 | if( fileName ){ |
314 | 315 | return fileName; |
315 | 316 | } |
— | — | @@ -327,7 +328,7 @@ |
328 | 329 | getURLDuration : function() { |
329 | 330 | // check if we have a URLTimeEncoding: |
330 | 331 | if ( this.URLTimeEncoding ) { |
331 | | - var annoURL = new mw.Uri( this.src ); |
| 332 | + var annoURL = new mw.Uri( mw.absoluteUrl( this.getSrc() ) ); |
332 | 333 | if ( annoURL.query.t ) { |
333 | 334 | var times = annoURL.query.t.split( '/' ); |
334 | 335 | this.start_npt = times[0]; |
— | — | @@ -350,7 +351,7 @@ |
351 | 352 | * @param String uri |
352 | 353 | */ |
353 | 354 | getExt : function( uri ){ |
354 | | - var urlParts = new mw.Uri( uri ); |
| 355 | + var urlParts = new mw.Uri( mw.absoluteUrl( uri ) ); |
355 | 356 | // Get the extension from the url or from the relative name: |
356 | 357 | var ext = ( urlParts.file )? /[^.]+$/.exec( urlParts.file ) : /[^.]+$/.exec( uri ); |
357 | 358 | return ext.toString().toLowerCase() |