Index: branches/MwEmbedStandAlone/loader.js |
— | — | @@ -46,15 +46,15 @@ |
47 | 47 | * is transcluded into base mwEmbed class include. |
48 | 48 | */ |
49 | 49 | var mwEnabledModuleList = [ |
| 50 | + 'AddMedia', |
| 51 | + 'ClipEdit', |
50 | 52 | 'EmbedPlayer', |
| 53 | + 'ApiProxy', |
| 54 | + 'SequenceEdit', |
51 | 55 | 'TimedText', |
52 | 56 | 'SmilPlayer', |
53 | | - 'MediaRss', |
54 | | - 'SwarmTransport', |
55 | | - 'AddMedia', |
56 | | - 'ClipEdit', |
57 | | - 'SequenceEdit', |
58 | | - 'ApiProxy' |
| 57 | + 'Playlist', |
| 58 | + 'SwarmTransport' |
59 | 59 | ]; |
60 | 60 | |
61 | 61 | /** |
Index: branches/MwEmbedStandAlone/mwEmbed.js |
— | — | @@ -1532,12 +1532,18 @@ |
1533 | 1533 | } else { |
1534 | 1534 | tm.seconds = Math.round( tm.seconds ); |
1535 | 1535 | } |
1536 | | - if ( tm.seconds < 10 ) |
| 1536 | + if ( tm.seconds < 10 ){ |
1537 | 1537 | tm.seconds = '0' + tm.seconds; |
1538 | | - if ( tm.minutes < 10 ) |
1539 | | - tm.minutes = '0' + tm.minutes; |
1540 | | - |
1541 | | - return tm.hours + ":" + tm.minutes + ":" + tm.seconds; |
| 1538 | + } |
| 1539 | + if( tm.hours == 0 ){ |
| 1540 | + hoursStr = '' |
| 1541 | + } else { |
| 1542 | + if ( tm.minutes < 10 ) |
| 1543 | + tm.minutes = '0' + tm.minutes; |
| 1544 | + |
| 1545 | + hoursStr = tm.hours + ":"; |
| 1546 | + } |
| 1547 | + return hoursStr + tm.minutes + ":" + tm.seconds; |
1542 | 1548 | } |
1543 | 1549 | |
1544 | 1550 | /** |
— | — | @@ -2175,7 +2181,7 @@ |
2176 | 2182 | * callback Function called once all triggers have been run |
2177 | 2183 | * |
2178 | 2184 | */ |
2179 | | - mw.runTriggersCallback = function( targetObject, triggerName, callback ){ |
| 2185 | + mw.runTriggersCallback = function( targetObject, triggerName, callback ){ |
2180 | 2186 | mw.log( ' runTriggersCallback:: ' + triggerName ); |
2181 | 2187 | // If events are not present directly run callback |
2182 | 2188 | if( ! $j( targetObject ).data( 'events' ) || |
— | — | @@ -2196,7 +2202,7 @@ |
2197 | 2203 | |
2198 | 2204 | mw.log(" runTriggersCallback:: " + callbackCount ); |
2199 | 2205 | var callInx = 0; |
2200 | | - $j( targetObject ).trigger( 'checkPlayerSourcesEvent', function() { |
| 2206 | + $j( targetObject ).trigger( triggerName, function() { |
2201 | 2207 | callInx++; |
2202 | 2208 | if( callInx == callbackCount ){ |
2203 | 2209 | // Run callback |
Index: branches/MwEmbedStandAlone/modules/SwarmTransport/mw.SwarmTransport.js |
— | — | @@ -76,7 +76,8 @@ |
77 | 77 | 'url' : mw.absoluteUrl( source.getSrc() ) |
78 | 78 | } |
79 | 79 | |
80 | | - mw.log( 'SwarmTransport:: lookup torrent url: ' + mw.getConfig( 'SwarmTransport.torrentLookupUrl' ) ); |
| 80 | + mw.log( 'SwarmTransport:: lookup torrent url: ' + mw.getConfig( 'SwarmTransport.torrentLookupUrl' ) |
| 81 | + + "\n" + mw.absoluteUrl( source.getSrc() )); |
81 | 82 | // Setup function to run in context based on callback result |
82 | 83 | $j.getJSON( |
83 | 84 | mw.getConfig( 'SwarmTransport.torrentLookupUrl' ) + '?jsonp=?', |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js |
— | — | @@ -90,18 +90,11 @@ |
91 | 91 | |
92 | 92 | /** |
93 | 93 | * Check the current DOM for any tags in "EmbedPlayer.RewriteTags" |
94 | | - * |
95 | | - * NOTE: this function can be part of setup can run prior to jQuery being ready |
96 | 94 | */ |
97 | 95 | mw.documentHasPlayerTags = function() { |
98 | 96 | var rewriteTags = mw.getConfig( 'EmbedPlayer.RewriteTags' ); |
99 | | - if( rewriteTags ) { |
100 | | - var jtags = rewriteTags.split( ',' ); |
101 | | - for ( var i = 0; i < jtags.length; i++ ) { |
102 | | - if( document.getElementsByTagName( jtags[i] )[0] ) { |
103 | | - return true; |
104 | | - } |
105 | | - } |
| 97 | + if( $j( rewriteTags ).length != 0 ) { |
| 98 | + return true; |
106 | 99 | } |
107 | 100 | |
108 | 101 | var tagCheckObject = { 'hasTags' : false }; |
— | — | @@ -244,9 +237,7 @@ |
245 | 238 | dependencyRequest.push( 'mw.style.PlayerSkin' + pSkin ); |
246 | 239 | } |
247 | 240 | |
248 | | - // Allow extension to extend the request. |
249 | | - //mw.log( 'LoaderEmbedPlayerUpdateRequest' ); |
250 | | - |
| 241 | + // Allow extension to extend the request. |
251 | 242 | $j( mw ).trigger( 'LoaderEmbedPlayerUpdateRequest', |
252 | 243 | [ playerElement, dependencyRequest ] ); |
253 | 244 | |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | "mwe-embedplayer-download_full" : "Download full video file:", |
35 | 35 | "mwe-embedplayer-download_right_click" : "To download, right click and select <i>Save link as...<\/i>", |
36 | 36 | "mwe-embedplayer-download_clip" : "Download video", |
37 | | - "mwe-embedplayer-download_text" : "Download text", |
| 37 | + "mwe-embedplayer-download_text" : "Download timed text", |
38 | 38 | "mwe-embedplayer-download" : "Download", |
39 | 39 | "mwe-embedplayer-share" : "Share", |
40 | 40 | "mwe-embedplayer-credits" : "Credits", |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | "mwe-embedplayer-ogg-player-kplayer" : "Kaltura player", |
58 | 58 | "mwe-embedplayer-ogg-player-selected" : "(selected)", |
59 | 59 | "mwe-embedplayer-generic_missing_plugin" : "You browser does not appear to support the following playback type: <b>$1<\/b><br \/>Visit the <a href=\"http:\/\/commons.wikimedia.org\/wiki\/Commons:Media_help\">Playback methods<\/a> page to download a player.<br \/>", |
60 | | - "mwe-embedplayer-missing-source" : "No source video was found. Check that your embed code includes a valid source or API key", |
| 60 | + "mwe-embedplayer-missing-source" : "No source video was found. Check that your API key includes html5 playable sources", |
61 | 61 | "mwe-embedplayer-for_best_experience" : "For a better video playback experience we recommend the <b><a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/upgrade.html?from=mwEmbed\">latest Firefox<\/a>.<\/b>", |
62 | 62 | "mwe-embedplayer-do_not_warn_again" : "Dismiss for now.", |
63 | 63 | "mwe-embedplayer-playerSelect" : "Players", |
— | — | @@ -259,22 +259,60 @@ |
260 | 260 | * |
261 | 261 | * Rewrites all tags via a given selector |
262 | 262 | * |
263 | | - * @param {Object} attributes [ Optional ] The embedPlayer options for the given video interface. |
264 | | - * Attributes Object can inclued any key value pair that would otherwise be |
| 263 | + * @param {object=} attributes Optional embedPlayer attributes for the given video interface. |
| 264 | + * Attributes Object can include any key value pair that would otherwise be |
265 | 265 | * an attribute in the html element. |
266 | 266 | * |
267 | 267 | * also see: mw.getConfig( 'embedPlayerAttributes' ) |
268 | 268 | * |
269 | | - * @param {Function} callback [ Optional ] Function to be called once video interfaces are ready |
| 269 | + * @param {Function=} callback Optional Function to be called once video interfaces are ready |
270 | 270 | * |
271 | 271 | */ |
272 | 272 | $.fn.embedPlayer = function( attributes, callback ) { |
273 | | - var playerSelect = this.selector; |
| 273 | + var playerSelect = this.selector; |
| 274 | + |
| 275 | + // Define attributes if unset |
| 276 | + if( !attributes ) { |
| 277 | + attributes = {}; |
| 278 | + } |
| 279 | + |
274 | 280 | // Handle optional include of attributes argument: |
275 | 281 | if( typeof attributes == 'function' ){ |
276 | | - callback = attributes; |
| 282 | + callback = attributes; |
| 283 | + attributes = {}; |
277 | 284 | } |
278 | 285 | |
| 286 | + |
| 287 | + // If we are dynamically embedding on a "div" check if we can |
| 288 | + // add a poster image behind the loader: |
| 289 | + $j( playerSelect ).each( function( index, playerElement) { |
| 290 | + if( playerElement.nodeName.toLowerCase() == 'div' |
| 291 | + && ( attributes.poster || $j(playerElement).attr( 'poster' ) ) ){ |
| 292 | + var posterSrc = ( attributes.poster ) ? attributes.poster : $j(playerElement).attr( 'poster' ); |
| 293 | + |
| 294 | + // Set image size: |
| 295 | + var width = $j( playerElement ).width(); |
| 296 | + var height = $j( playerElement ).height(); |
| 297 | + if( !width ){ |
| 298 | + var width = ( attributes.width )? attributes.width : '100%'; |
| 299 | + } |
| 300 | + if( !height ){ |
| 301 | + var height = ( attributes.height )? attributes.height : '100%'; |
| 302 | + } |
| 303 | + |
| 304 | + mw.log('EmbedPlayer:: set loading background img' + posterSrc); |
| 305 | + $j( playerElement ).append( |
| 306 | + $j( '<img />' ) |
| 307 | + .attr( 'src', posterSrc) |
| 308 | + .css({ |
| 309 | + 'position' : 'absolute', |
| 310 | + 'width' : width, |
| 311 | + 'height' : height |
| 312 | + }) |
| 313 | + ) |
| 314 | + } |
| 315 | + }); |
| 316 | + |
279 | 317 | // If we have not detected browser plugin embed types do that now |
280 | 318 | if( ! mw.EmbedTypes.players ){ |
281 | 319 | mw.EmbedTypes.init(); |
— | — | @@ -282,10 +320,10 @@ |
283 | 321 | |
284 | 322 | // Create the Global Embed Player Manager ( if not already created ) |
285 | 323 | if( ! mw.playerManager ) { |
286 | | - mw.log( "Create the player manager:" ); |
| 324 | + mw.log( "EmbedPlayer::Create the player manager:" ); |
287 | 325 | mw.playerManager = new EmbedPlayerManager(); |
288 | 326 | // Run the global hooks that mw.playerManager is ready |
289 | | - mw.log( 'trigger: EmbedPlayerManagerReady'); |
| 327 | + mw.log( 'EmbedPlayer::trigger: EmbedPlayerManagerReady'); |
290 | 328 | $j( mw ).trigger( 'EmbedPlayerManagerReady' ); |
291 | 329 | } |
292 | 330 | |
— | — | @@ -296,10 +334,10 @@ |
297 | 335 | // Make sure we have user preference setup ( for setting preferences on video selection ) |
298 | 336 | mw.setupUserConfig( function() { |
299 | 337 | // Add each selected element to the player manager: |
300 | | - $j( playerSelect ).each( function( index, playerElement) { |
301 | | - // make sure the video tag was not generated by our own native player: |
| 338 | + $j( playerSelect ).each( function( index, playerElement) { |
| 339 | + // Make sure the video tag was not generated by our own native player: |
302 | 340 | if( $j( playerElement ).hasClass( 'nativeEmbedPlayerPid' ) ){ |
303 | | - mw.log( '$j.embedPlayer skip native player: ' + playerElement ); |
| 341 | + mw.log( 'EmbedPlayer::$j.embedPlayer skip embedPlayer gennerated video: ' + playerElement ); |
304 | 342 | } else { |
305 | 343 | mw.playerManager.addElement( playerElement, attributes); |
306 | 344 | } |
— | — | @@ -382,14 +420,16 @@ |
383 | 421 | // that add to the request set |
384 | 422 | var playerDependencyRequest = [ ]; |
385 | 423 | |
| 424 | + // merge in any custom attributes |
| 425 | + $j.extend( playerElement, attributes ); |
| 426 | + |
386 | 427 | // Update the list of dependent libraries for the player |
387 | 428 | // ( allows extensions to add to the dependency list ) |
388 | 429 | mw.embedPlayerUpdateLibraryRequest( playerElement, playerDependencyRequest ); |
389 | 430 | |
390 | 431 | // Load any skins we need then swap in the interface |
391 | 432 | mw.load( playerDependencyRequest, function() { |
392 | | - var waitForMeta = true; |
393 | | - |
| 433 | + var waitForMeta = true; |
394 | 434 | // Be sure to "stop" the target ( sometimes firefox keeps playing the video even |
395 | 435 | // though its been removed from the DOM ) |
396 | 436 | if( playerElement.pause ){ |
— | — | @@ -417,11 +457,11 @@ |
418 | 458 | var ranPlayerSwapFlag = false; |
419 | 459 | |
420 | 460 | // Local callback to runPlayer swap once playerElement has metadata |
421 | | - function runPlayerSwap() { |
| 461 | + function runPlayerSwap() { |
422 | 462 | if( ranPlayerSwapFlag ){ |
423 | 463 | return ; |
424 | 464 | } |
425 | | - mw.log("mwEmbedPlayer::runPlayerSwap::" + $j( playerElement ).attr('id') ); |
| 465 | + mw.log("EmbedPlayer::runPlayerSwap::" + $j( playerElement ).attr('id') ); |
426 | 466 | ranPlayerSwapFlag = true; |
427 | 467 | var playerInterface = new mw.EmbedPlayer( playerElement , attributes); |
428 | 468 | |
— | — | @@ -429,7 +469,7 @@ |
430 | 470 | |
431 | 471 | |
432 | 472 | // Pass the id to any hook that needs to interface prior to checkPlayerSources |
433 | | - mw.log("mwEmbedPlayer::addElement :trigger :: newEmbedPlayerEvent"); |
| 473 | + mw.log("EmbedPlayer::addElement :trigger :: newEmbedPlayerEvent"); |
434 | 474 | $j( mw ).trigger ( 'newEmbedPlayerEvent', playerInterface.id ); |
435 | 475 | |
436 | 476 | // Issue the checkPlayerSources call to the new player interface: |
— | — | @@ -438,7 +478,7 @@ |
439 | 479 | } |
440 | 480 | |
441 | 481 | if( waitForMeta ) { |
442 | | - mw.log('mwEmbedPlayer::WaitForMeta ( video missing height (' + $j( playerElement ).attr('height') + '), width (' + $j( playerElement ).attr('width') + ') or duration' ); |
| 482 | + mw.log('EmbedPlayer::WaitForMeta ( video missing height (' + $j( playerElement ).attr('height') + '), width (' + $j( playerElement ).attr('width') + ') or duration' ); |
443 | 483 | playerElement.removeEventListener( "loadedmetadata", runPlayerSwap, true ); |
444 | 484 | playerElement.addEventListener( "loadedmetadata", runPlayerSwap, true ); |
445 | 485 | |
— | — | @@ -533,7 +573,7 @@ |
534 | 574 | * @param {Object} playerInterface Interface to swap into the target element |
535 | 575 | */ |
536 | 576 | swapEmbedPlayerElement: function( targetElement, playerInterface ) { |
537 | | - mw.log( 'swapEmbedPlayerElement: ' + targetElement.id ); |
| 577 | + mw.log( 'EmbedPlayer::swapEmbedPlayerElement: ' + targetElement.id ); |
538 | 578 | // Create a new element to swap the player interface into |
539 | 579 | var swapPlayerElement = document.createElement('div'); |
540 | 580 | |
— | — | @@ -591,7 +631,7 @@ |
592 | 632 | */ |
593 | 633 | playerReady: function( player ) { |
594 | 634 | var _this = this; |
595 | | - mw.log( 'ReadyToPlay callback player:' + player.id ); |
| 635 | + mw.log( 'EmbedPlayer::ReadyToPlay callback player:' + player.id ); |
596 | 636 | player.readyToPlay = true; |
597 | 637 | |
598 | 638 | // Remove the player loader spinner: |
— | — | @@ -612,7 +652,7 @@ |
613 | 653 | // Be sure to remove any player loader spinners |
614 | 654 | $j('.playerLoadingSpinner').remove(); |
615 | 655 | |
616 | | - mw.log( "All on-page players ready run playerMannager callbacks" ); |
| 656 | + mw.log( "EmbedPlayer::All on-page players ready run playerMannager callbacks" ); |
617 | 657 | // Run queued functions |
618 | 658 | if( _this.callbackFunctions ) { |
619 | 659 | while ( _this.callbackFunctions.length ) { |
— | — | @@ -676,7 +716,7 @@ |
677 | 717 | * MediaSource constructor: |
678 | 718 | */ |
679 | 719 | init : function( element ) { |
680 | | - // mw.log('adding mediaSource: ' + element); |
| 720 | + // mw.log('EmbedPlayer::adding mediaSource: ' + element); |
681 | 721 | this.src = $j( element ).attr( 'src' ); |
682 | 722 | |
683 | 723 | // Set default URLTimeEncoding if we have a time url: |
— | — | @@ -970,7 +1010,7 @@ |
971 | 1011 | */ |
972 | 1012 | init: function( videoElement ) { |
973 | 1013 | var _this = this; |
974 | | - mw.log( "mediaElement::init:" + videoElement.id ); |
| 1014 | + mw.log( "EmbedPlayer::mediaElement:init:" + videoElement.id ); |
975 | 1015 | this.sources = new Array(); |
976 | 1016 | |
977 | 1017 | // Process the videoElement as a source element: |
— | — | @@ -1003,7 +1043,7 @@ |
1004 | 1044 | */ |
1005 | 1045 | textSourceExists: function() { |
1006 | 1046 | for ( var i = 0; i < this.sources.length; i++ ) { |
1007 | | - mw.log( this.sources[i].mimeType ); |
| 1047 | + mw.log('EmbedPlayer::textSourceExists:'+ this.sources[i].mimeType ); |
1008 | 1048 | if ( this.sources[i].mimeType == 'text/cmml' || |
1009 | 1049 | this.sources[i].mimeType == 'text/x-srt' ) |
1010 | 1050 | { |
— | — | @@ -1055,7 +1095,7 @@ |
1056 | 1096 | * @param {Number} index Index of source element to set as selectedSource |
1057 | 1097 | */ |
1058 | 1098 | selectSource:function( index ) { |
1059 | | - mw.log( 'f:selectSource:' + index ); |
| 1099 | + mw.log( 'EmbedPlayer::mediaElement:selectSource:' + index ); |
1060 | 1100 | var playableSources = this.getPlayableSources(); |
1061 | 1101 | for ( var i = 0; i < playableSources.length; i++ ) { |
1062 | 1102 | if ( i == index ) { |
— | — | @@ -1071,7 +1111,7 @@ |
1072 | 1112 | * Selects the default source via cookie preference, default marked, or by id order |
1073 | 1113 | */ |
1074 | 1114 | autoSelectSource: function() { |
1075 | | - mw.log( 'f:autoSelectSource:' ); |
| 1115 | + mw.log( 'EmbedPlayer::mediaElement::autoSelectSource:' ); |
1076 | 1116 | // Select the default source |
1077 | 1117 | var playableSources = this.getPlayableSources(); |
1078 | 1118 | var flash_flag = ogg_flag = false; |
— | — | @@ -1099,7 +1139,6 @@ |
1100 | 1140 | for ( var source = 0; source < playableSources.length; source++ ) { |
1101 | 1141 | var mimeType = playableSources[source].mimeType; |
1102 | 1142 | var player = mw.EmbedTypes.players.defaultPlayer( mimeType ); |
1103 | | - mw.log( 'f:autoSelectSource:' + mimeType ); |
1104 | 1143 | if ( this.isOgg( mimeType ) && player && player.library == 'Native' ) { |
1105 | 1144 | this.selectedSource = playableSources[ source ]; |
1106 | 1145 | return true; |
— | — | @@ -1230,7 +1269,7 @@ |
1231 | 1270 | * @param roe_data ROE data. |
1232 | 1271 | */ |
1233 | 1272 | addROE: function( roe_data ) { |
1234 | | - mw.log( 'f:addROE' ); |
| 1273 | + mw.log( 'EmbedPlayer::mediaElement:addROE' ); |
1235 | 1274 | this.addedROEData = true; |
1236 | 1275 | var _this = this; |
1237 | 1276 | if ( roe_data ) { |
— | — | @@ -1410,7 +1449,7 @@ |
1411 | 1450 | |
1412 | 1451 | // Make sure duration is a float: |
1413 | 1452 | this.duration = parseFloat( this.duration ); |
1414 | | - mw.log( this.id + " duration is: " + this.duration ); |
| 1453 | + mw.log( 'EmbedPlayer::mediaElement:' + this.id + " duration is: " + this.duration ); |
1415 | 1454 | |
1416 | 1455 | // Set the player size attributes based loaded video element: |
1417 | 1456 | this.setPlayerSize( element ); |
— | — | @@ -1552,7 +1591,7 @@ |
1553 | 1592 | * that request is issued here |
1554 | 1593 | */ |
1555 | 1594 | checkPlayerSources: function() { |
1556 | | - mw.log( 'f:checkPlayerSources: ' + this.id ); |
| 1595 | + mw.log( 'EmbedPlayer::checkPlayerSources: ' + this.id ); |
1557 | 1596 | var _this = this; |
1558 | 1597 | |
1559 | 1598 | // Scope the end of check for player sources so it can be called in a callback |
— | — | @@ -1566,7 +1605,7 @@ |
1567 | 1606 | // NOTE: Should could be moved to mediaWiki Api support module |
1568 | 1607 | if ( _this.apiTitleKey ) { |
1569 | 1608 | // Load media from external data |
1570 | | - mw.log( 'checkPlayerSources: loading apiTitleKey data' ); |
| 1609 | + mw.log( 'EmbedPlayer::checkPlayerSources: loading apiTitleKey data' ); |
1571 | 1610 | _this.loadSourceFromApi( function(){ |
1572 | 1611 | finishCheckPlayerSources(); |
1573 | 1612 | } ); |
— | — | @@ -1673,7 +1712,7 @@ |
1674 | 1713 | */ |
1675 | 1714 | checkForTimedText: function( ) { |
1676 | 1715 | var _this = this; |
1677 | | - mw.log( 'checkForTimedText: ' + _this.id + " height: " + this.height ); |
| 1716 | + mw.log( 'EmbedPlayer::checkForTimedText: ' + _this.id + " height: " + this.height ); |
1678 | 1717 | // Check for timedText support |
1679 | 1718 | if( this.isTimedTextSupported() ) { |
1680 | 1719 | mw.load( 'TimedText', function() { |
— | — | @@ -1693,7 +1732,7 @@ |
1694 | 1733 | * Sets load error if no source is playable |
1695 | 1734 | */ |
1696 | 1735 | setupSourcePlayer: function() { |
1697 | | - mw.log("setupSourcePlayer: " + this.id ); |
| 1736 | + mw.log("EmbedPlayer::setupSourcePlayer: " + this.id ); |
1698 | 1737 | // Autoseletct the media source |
1699 | 1738 | this.mediaElement.autoSelectSource(); |
1700 | 1739 | |
— | — | @@ -1732,6 +1771,9 @@ |
1733 | 1772 | |
1734 | 1773 | mw.log( 'No player found for given source type ' + missingType ); |
1735 | 1774 | this.showPluginMissingHTML( missingType ); |
| 1775 | + |
| 1776 | + // Call the global player manager to inform this video interface is "ready" for page callback to be proccessed. |
| 1777 | + mw.playerManager.playerReady( this ); |
1736 | 1778 | } |
1737 | 1779 | }, |
1738 | 1780 | |
— | — | @@ -1741,7 +1783,7 @@ |
1742 | 1784 | * @param {Function} callback Function to be called once playback-system has been inherited |
1743 | 1785 | */ |
1744 | 1786 | inheritEmbedPlayer: function( callback ) { |
1745 | | - mw.log( "inheritEmbedPlayer:duration is: " + this.getDuration() + ' p: ' + this.id ); |
| 1787 | + mw.log( "EmbedPlayer::inheritEmbedPlayer:duration is: " + this.getDuration() + ' p: ' + this.id ); |
1746 | 1788 | |
1747 | 1789 | // Clear out any non-base embedObj methods: |
1748 | 1790 | if ( this.instanceOf ) { |
— | — | @@ -1886,7 +1928,7 @@ |
1887 | 1929 | if ( this.supportsURLTimeEncoding() ) { |
1888 | 1930 | // Make sure this.seek_time_sec is up-to-date: |
1889 | 1931 | this.seek_time_sec = mw.npt2seconds( this.start_npt ) + parseFloat( percent * this.getDuration() ); |
1890 | | - mw.log( 'updated seek_time_sec: ' + mw.seconds2npt ( this.seek_time_sec ) ); |
| 1932 | + mw.log( 'EmbedPlayer::doSeek:: updated seek_time_sec: ' + mw.seconds2npt ( this.seek_time_sec ) ); |
1891 | 1933 | this.stop(); |
1892 | 1934 | this.didSeekJump = true; |
1893 | 1935 | // Update the slider |
— | — | @@ -1916,7 +1958,7 @@ |
1917 | 1959 | * issues a loading request |
1918 | 1960 | */ |
1919 | 1961 | doEmbedPlayer: function() { |
1920 | | - mw.log( 'EmbedPlayer :: doEmbedPlayer::' + this.selectedPlayer.id ); |
| 1962 | + mw.log( 'EmbedPlayer::doEmbedPlayer::' + this.selectedPlayer.id ); |
1921 | 1963 | //mw.log( 'thum disp:' + this.thumbnail_disp ); |
1922 | 1964 | var _this = this; |
1923 | 1965 | |
— | — | @@ -1938,7 +1980,7 @@ |
1939 | 1981 | _this.bufferEndFlag = false; |
1940 | 1982 | |
1941 | 1983 | // Make sure the player is |
1942 | | - mw.log( 'performing embed for ' + _this.id ); |
| 1984 | + mw.log( 'EmbedPlayer::performing embed for ' + _this.id ); |
1943 | 1985 | }; |
1944 | 1986 | |
1945 | 1987 | // If no binded events, run the local doEmbedPlayer function directly: |
— | — | @@ -1962,7 +2004,7 @@ |
1963 | 2005 | * On clip done action. Called once a clip is done playing |
1964 | 2006 | */ |
1965 | 2007 | onClipDone: function() { |
1966 | | - mw.log( 'base:onClipDone ::' + this.id + ' doneCount:' + this.donePlayingCount ); |
| 2008 | + mw.log( 'EmbedPlayer::onClipDone:' + this.id + ' doneCount:' + this.donePlayingCount ); |
1967 | 2009 | var _this = this; |
1968 | 2010 | |
1969 | 2011 | |
— | — | @@ -2014,7 +2056,7 @@ |
2015 | 2057 | */ |
2016 | 2058 | showThumbnail: function() { |
2017 | 2059 | var _this = this; |
2018 | | - mw.log( 'f:showThumbnail' + this.thumbnail_disp ); |
| 2060 | + mw.log( 'EmbedPlayer::showThumbnail' + this.thumbnail_disp ); |
2019 | 2061 | |
2020 | 2062 | // Close Menu Overlay: |
2021 | 2063 | this.controlBuilder.closeMenuOverlay(); |
— | — | @@ -2074,7 +2116,7 @@ |
2075 | 2117 | } |
2076 | 2118 | |
2077 | 2119 | if ( this.autoplay ) { |
2078 | | - mw.log( 'showPlayer::activating autoplay' ); |
| 2120 | + mw.log( 'EmbedPlayer::showPlayer::activating autoplay' ); |
2079 | 2121 | // Issue a non-blocking play request |
2080 | 2122 | setTimeout(function(){ |
2081 | 2123 | _this.play(); |
— | — | @@ -2097,7 +2139,9 @@ |
2098 | 2140 | $j( '#' + this.pid ).hide() |
2099 | 2141 | } |
2100 | 2142 | if( this.mediaElement.sources.length == 0 ){ |
2101 | | - $j( this ).html( |
| 2143 | + // hide the pid if present: |
| 2144 | + $j( '#pid_' + this.id ).hide(); |
| 2145 | + $j( this ).show().html( |
2102 | 2146 | $j('<span />').text( |
2103 | 2147 | gM('mwe-embedplayer-missing-source') |
2104 | 2148 | ) |
— | — | @@ -2133,7 +2177,7 @@ |
2134 | 2178 | * @param {String} time_req |
2135 | 2179 | */ |
2136 | 2180 | updateVideoTimeReq: function( time_req ) { |
2137 | | - mw.log( 'f:updateVideoTimeReq' ); |
| 2181 | + mw.log( 'EmbedPlayer::updateVideoTimeReq:' + time_req ); |
2138 | 2182 | var time_parts = time_req.split( '/' ); |
2139 | 2183 | this.updateVideoTime( time_parts[0], time_parts[1] ); |
2140 | 2184 | }, |
— | — | @@ -2298,7 +2342,7 @@ |
2299 | 2343 | * download, and embed code. |
2300 | 2344 | */ |
2301 | 2345 | updatePosterHTML: function () { |
2302 | | - mw.log( 'embedPlayer:updatePosterHTML::' + this.id ); |
| 2346 | + mw.log( 'EmbedPlayer:updatePosterHTML::' + this.id ); |
2303 | 2347 | var thumb_html = ''; |
2304 | 2348 | var class_atr = ''; |
2305 | 2349 | var style_atr = ''; |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/binPlayers/kaltura-player/kdp3.swf |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/binPlayers/kaltura-player/LightDoodleskin.swf |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: branches/MwEmbedStandAlone/modules/EmbedPlayer/binPlayers/kaltura-player/LightDoodleskin.swf |
___________________________________________________________________ |
Added: svn:mime-type |
2306 | 2350 | + application/octet-stream |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/EmbedPlayer.i18n.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | 'mwe-embedplayer-video-flv' => 'Flash video', |
69 | 69 | 'mwe-embedplayer-video-ogg' => 'Ogg video', |
70 | 70 | 'mwe-embedplayer-video-audio' => 'Ogg audio', |
71 | | - 'mwe-embedplayer-missing-source' => 'No source video was found. Check that your embed code includes a source or API key', |
| 71 | + 'mwe-embedplayer-missing-source' => 'No source video was found. Check that your API key includes html5 playable sources', |
72 | 72 | ); |
73 | 73 | |
74 | 74 | /** Afrikaans (Afrikaans) */ |
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | | -var mwRemoteVersion = 'r136'; |
| 8 | +var mwRemoteVersion = 'r137'; |
9 | 9 | var mwUseScriptLoader = true; |
10 | 10 | |
11 | 11 | // Log the mwRemote version makes it easy to debug cache issues |