Index: branches/MwEmbedStandAlone/mwEmbed.js |
— | — | @@ -505,7 +505,7 @@ |
506 | 506 | // Issue the load request check check loadStates to see if we are |
507 | 507 | // "done" |
508 | 508 | for( var loadName in loadStates ) { |
509 | | - mw.log("loadMany: load: " + loadName ); |
| 509 | + //mw.log("loadMany: load: " + loadName ); |
510 | 510 | this.load( loadName, function ( loadName ) { |
511 | 511 | loadStates[ loadName ] = 1; |
512 | 512 | |
— | — | @@ -1834,6 +1834,18 @@ |
1835 | 1835 | return parsedUrl.protocol + '://' + parsedUrl.authority + parsedUrl.directory + src; |
1836 | 1836 | } |
1837 | 1837 | }; |
| 1838 | + /** |
| 1839 | + * Check if a given source string is likely a url |
| 1840 | + * |
| 1841 | + * @return {boolean} |
| 1842 | + * true if a url |
| 1843 | + * false if a string |
| 1844 | + */ |
| 1845 | + mw.isUrl = function( src ){ |
| 1846 | + var parsedSrc = mw.parseUri( src ); |
| 1847 | + // if the url is just a string source and host will match |
| 1848 | + return ( parsedSrc.host != parsedSrc.source ); |
| 1849 | + }; |
1838 | 1850 | |
1839 | 1851 | /** |
1840 | 1852 | * Escape quotes in a text string |
— | — | @@ -1987,23 +1999,30 @@ |
1988 | 2000 | * @return true if found, return false if not found |
1989 | 2001 | */ |
1990 | 2002 | mw.hasJQueryUiCss = function(){ |
1991 | | - var hasUiCss = false; |
| 2003 | + var hasUiCss = false; |
| 2004 | + var cssStyleSheetNames = ['jquery-ui-1.7.2.css', 'jquery-ui.css']; |
1992 | 2005 | // Load the jQuery ui skin if usability skin not set |
1993 | 2006 | $j( 'link' ).each( function( na, linkNode ){ |
1994 | | - if( $j( linkNode ).attr( 'href' ).indexOf( 'jquery-ui-1.7.2.css' ) != -1 ) { |
1995 | | - hasUiCss = true; |
1996 | | - return true; |
1997 | | - } |
| 2007 | + $j.each( cssStyleSheetNames, function(inx, sheetName ){ |
| 2008 | + if( $j( linkNode ).attr( 'href' ).indexOf( sheetName ) != -1 ){ |
| 2009 | + hasUiCss = true; |
| 2010 | + return true; |
| 2011 | + } |
| 2012 | + }) |
1998 | 2013 | } ); |
1999 | | - // Check all the "style" nodes for @import of jquery-ui-1.7.2.css |
| 2014 | + // Check all the "style" nodes for @import for sheet name |
2000 | 2015 | // xxx Note: we could do this a bit cleaner with regEx |
2001 | 2016 | $j( 'style' ).each( function( na, styleNode ){ |
2002 | | - if( $j( styleNode ).text().indexOf( '@import' ) != -1 |
2003 | | - && $j( styleNode ).text().indexOf( 'jquery-ui-1.7.2.css' ) != -1 ){ |
| 2017 | + $j.each( cssStyleSheetNames, function(inx, sheetName ){ |
| 2018 | + if( $j( styleNode ).text().indexOf( '@import' ) != -1 |
| 2019 | + && |
| 2020 | + $j( styleNode ).text().indexOf( sheetName ) != -1 ) |
| 2021 | + { |
2004 | 2022 | hasUiCss=true; |
2005 | | - } |
2006 | | - }); |
2007 | | - |
| 2023 | + return true; |
| 2024 | + } |
| 2025 | + }); |
| 2026 | + }); |
2008 | 2027 | return hasUiCss; |
2009 | 2028 | } |
2010 | 2029 | |
Index: branches/MwEmbedStandAlone/README |
— | — | @@ -1,5 +1,5 @@ |
2 | | -# Kaltura HTML5 Media Javascript Library |
3 | 2 | |
| 3 | + |
4 | 4 | ## Library Overview |
5 | 5 | |
6 | 6 | [html5]: https://developer.mozilla.org/En/Using_audio_and_video_in_FireFox |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | |
16 | 16 | // A default apiProvider ( ie where to lookup subtitles, video properties etc ) |
17 | 17 | // NOTE: Each player instance can also specify a specific provider |
18 | | - "EmbedPlayer.ApiProvider" : "commons", |
| 18 | + "EmbedPlayer.ApiProvider" : "local", |
19 | 19 | |
20 | 20 | // What tags will be re-written to video player by default |
21 | 21 | // Set to empty string or null to avoid automatic video tag rewrites to embedPlayer |
— | — | @@ -210,41 +210,26 @@ |
211 | 211 | * @param {Array} dependencyRequest The library request array |
212 | 212 | */ |
213 | 213 | mw.embedPlayerUpdateLibraryRequest = function(playerElement, dependencyRequest ){ |
214 | | - var playerClassName = $j( playerElement ).attr( 'class' ); |
215 | | - var playerSkins = {}; |
216 | | - |
217 | | - // Set playerClassName to default |
218 | | - if( ! playerClassName ){ |
219 | | - playerClassName = mw.getConfig( 'EmbedPlayer.SkinName' ); |
220 | | - } |
221 | | - // compre with lower case: |
222 | | - playerClassName = playerClassName.toLowerCase(); |
223 | | - for( var n=0; n < mw.validSkins.length ; n++ ) { |
224 | | - // Get any other skins that we need to load |
225 | | - // That way skin js can be part of the single script-loader request: |
226 | | - if( playerClassName.indexOf( mw.validSkins[ n ].toLowerCase() ) !== -1) { |
227 | | - // Add skin name to playerSkins |
228 | | - playerSkins[ mw.validSkins[ n ].toLowerCase() ] = true; |
229 | | - } |
| 214 | + var skinName = $j( playerElement ).attr( 'class' ); |
| 215 | + // Set playerClassName to default if unset or not a valid skin |
| 216 | + if( ! skinName || $j.inArray( skinName.toLowerCase(), mw.validSkins ) == -1 ){ |
| 217 | + skinName = mw.getConfig( 'EmbedPlayer.SkinName' ); |
230 | 218 | } |
| 219 | + skinName = skinName.toLowerCase(); |
| 220 | + // Add the skin to the request |
| 221 | + var skinCaseName = skinName.charAt(0).toUpperCase() + skinName.substr(1); |
| 222 | + // The skin js: |
| 223 | + if( $j.inArray( 'mw.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){ |
| 224 | + dependencyRequest.push( 'mw.PlayerSkin' + skinCaseName ); |
| 225 | + } |
| 226 | + // The skin css |
| 227 | + if( $j.inArray( 'mw.style.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){ |
| 228 | + dependencyRequest.push( 'mw.style.PlayerSkin' + skinCaseName ); |
| 229 | + } |
231 | 230 | |
232 | | - |
233 | | - // Add the player skins css and js to the load request: |
234 | | - for( var pSkin in playerSkins ) { |
235 | | - // Make sure first letter of skin is upper case to load skin class: |
236 | | - var f = pSkin.charAt(0).toUpperCase(); |
237 | | - pSkin = f + pSkin.substr(1); |
238 | | - |
239 | | - // Add skin js |
240 | | - dependencyRequest.push( 'mw.PlayerSkin' + pSkin ); |
241 | | - // Add the skin css |
242 | | - dependencyRequest.push( 'mw.style.PlayerSkin' + pSkin ); |
243 | | - } |
244 | | - |
245 | 231 | // Allow extension to extend the request. |
246 | 232 | $j( mw ).trigger( 'LoaderEmbedPlayerUpdateRequest', |
247 | 233 | [ playerElement, dependencyRequest ] ); |
248 | | - |
249 | 234 | } |
250 | 235 | |
251 | 236 | } )( window.mw ); |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/tests/Player_ServerSideSeek.html |
— | — | @@ -0,0 +1,14 @@ |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <script type="text/javascript" src="http://html5.kaltura.org/js"></script> |
| 5 | + </head> |
| 6 | + <body> |
| 7 | + <h2>mwEmbed / archive.org server side seek</h2> |
| 8 | + |
| 9 | + <video poster="http://www.archive.org/download/night_of_the_living_dead/format=Thumbnail&x.jpg" |
| 10 | + style="width:400px;height:300px" durationHint="5717.21"> |
| 11 | + <source URLTimeEncoding="true" src="http://www.archive.org/download/night_of_the_living_dead/night_of_the_living_dead_512kb.mp4"/> |
| 12 | + <source URLTimeEncoding="true" src="http://www.archive.org/download/night_of_the_living_dead/night_of_the_living_dead.ogv"/> |
| 13 | + </video> |
| 14 | + </body> |
| 15 | +</html> |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/tests/Player_Sources.html |
— | — | @@ -0,0 +1,20 @@ |
| 2 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | +<head> |
| 5 | +<title>Player sources</title> |
| 6 | + |
| 7 | +<script type="text/javascript" src="../../../mwEmbed.js?debug=true"></script> |
| 8 | +</head> |
| 9 | +<body> |
| 10 | + |
| 11 | + |
| 12 | +<video poster="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream.jpg" |
| 13 | + duration="10:53" preload="auto"> |
| 14 | + <source type="video/webm" src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream_400p.webm" /> |
| 15 | + <source type="video/h264" src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream_iphone.m4v" /> |
| 16 | + <source type="video/ogg" src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream_400p.ogv" /> |
| 17 | +</video> |
| 18 | + |
| 19 | + |
| 20 | +</body> |
| 21 | +</html> |
\ No newline at end of file |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | /* |
77 | 77 | * The default video attributes supported by embedPlayer |
78 | 78 | */ |
79 | | -mw.setConfig( 'embedPlayerAttributes', { |
| 79 | +mw.setConfig( 'EmbedPlayer.Attributes', { |
80 | 80 | /* |
81 | 81 | * Base html element attributes: |
82 | 82 | */ |
— | — | @@ -264,7 +264,7 @@ |
265 | 265 | * Attributes Object can include any key value pair that would otherwise be |
266 | 266 | * an attribute in the html element. |
267 | 267 | * |
268 | | - * also see: mw.getConfig( 'embedPlayerAttributes' ) |
| 268 | + * also see: mw.getConfig( 'EmbedPlayer.Attributes' ) |
269 | 269 | * |
270 | 270 | * @param {Function=} callback Optional Function to be called once video interfaces are ready |
271 | 271 | * |
— | — | @@ -369,6 +369,8 @@ |
370 | 370 | // Functions to run after the video interface is ready |
371 | 371 | callbackFunctions : null, |
372 | 372 | |
| 373 | + playerElementQueue: [], |
| 374 | + |
373 | 375 | /** |
374 | 376 | * Constructor initializes callbackFunctions and playerList |
375 | 377 | */ |
— | — | @@ -422,13 +424,13 @@ |
423 | 425 | playerElement.id = 'vid' + ( this.playerList.length + 1 ); |
424 | 426 | } |
425 | 427 | mw.log('EmbedPlayerManager: addElement:: ' + playerElement.id ); |
426 | | - |
| 428 | + |
427 | 429 | // Add the element id to playerList |
428 | 430 | this.playerList.push( playerElement.id ); |
429 | 431 | |
430 | 432 | // Check for player attributes such as skins or plugins attributes |
431 | 433 | // that add to the request set |
432 | | - var playerDependencyRequest = [ ]; |
| 434 | + var playerDependencyRequest = []; |
433 | 435 | |
434 | 436 | // merge in any custom attributes |
435 | 437 | $j.extend( playerElement, attributes ); |
— | — | @@ -436,10 +438,11 @@ |
437 | 439 | // Update the list of dependent libraries for the player |
438 | 440 | // ( allows extensions to add to the dependency list ) |
439 | 441 | mw.embedPlayerUpdateLibraryRequest( playerElement, playerDependencyRequest ); |
440 | | - |
| 442 | + |
441 | 443 | // Load any skins we need then swap in the interface |
442 | | - mw.load( playerDependencyRequest, function() { |
443 | | - var waitForMeta = true; |
| 444 | + mw.load( playerDependencyRequest, function() { |
| 445 | + var waitForMeta = true; |
| 446 | + |
444 | 447 | // Be sure to "stop" the target ( sometimes firefox keeps playing the video even |
445 | 448 | // though its been removed from the DOM ) |
446 | 449 | if( playerElement.pause ){ |
— | — | @@ -497,7 +500,7 @@ |
498 | 501 | playerElement.removeEventListener( "loadedmetadata", runPlayerSwap, true ); |
499 | 502 | playerElement.addEventListener( "loadedmetadata", runPlayerSwap, true ); |
500 | 503 | |
501 | | - // Time-out of 5 seconds ( maybe still playable but no timely metadata ) |
| 504 | + // Time-out of 5 seconds ( maybe still playable but no timely metadata ) |
502 | 505 | setTimeout( runPlayerSwap, 5000 ); |
503 | 506 | return ; |
504 | 507 | } else { |
— | — | @@ -850,11 +853,11 @@ |
851 | 854 | }, |
852 | 855 | |
853 | 856 | /** URI function. |
854 | | - * @param {Number} seek_time_sec Int: Used to adjust the URI for url based seeks) |
| 857 | + * @param {Number} serverSeekTime Int: Used to adjust the URI for url based seeks) |
855 | 858 | * @return {String} the URI of the source. |
856 | 859 | */ |
857 | | - getSrc : function( seek_time_sec ) { |
858 | | - if ( !seek_time_sec || !this.URLTimeEncoding ) { |
| 860 | + getSrc : function( serverSeekTime ) { |
| 861 | + if ( !serverSeekTime || !this.URLTimeEncoding ) { |
859 | 862 | return this.src; |
860 | 863 | } |
861 | 864 | var endvar = ''; |
— | — | @@ -863,7 +866,7 @@ |
864 | 867 | } |
865 | 868 | return mw.replaceUrlParams( this.src, |
866 | 869 | { |
867 | | - 't': mw.seconds2npt( seek_time_sec ) + endvar |
| 870 | + 't': mw.seconds2npt( serverSeekTime ) + endvar |
868 | 871 | } |
869 | 872 | ); |
870 | 873 | }, |
— | — | @@ -1032,6 +1035,7 @@ |
1033 | 1036 | if ( $j( videoElement ).attr( "src" ) ) { |
1034 | 1037 | _this.tryAddSource( videoElement ); |
1035 | 1038 | } |
| 1039 | + |
1036 | 1040 | // Process elements source children |
1037 | 1041 | $j( videoElement ).find( 'source,track' ).each( function( ) { |
1038 | 1042 | _this.tryAddSource( this ); |
— | — | @@ -1126,7 +1130,7 @@ |
1127 | 1131 | * Selects the default source via cookie preference, default marked, or by id order |
1128 | 1132 | */ |
1129 | 1133 | autoSelectSource: function() { |
1130 | | - mw.log( 'EmbedPlayer::mediaElement::autoSelectSource:' ); |
| 1134 | + mw.log( 'EmbedPlayer::mediaElement::autoSelectSource:' + this.id); |
1131 | 1135 | // Select the default source |
1132 | 1136 | var playableSources = this.getPlayableSources(); |
1133 | 1137 | var flash_flag = ogg_flag = false; |
— | — | @@ -1359,7 +1363,7 @@ |
1360 | 1364 | 'cmmlData': null, |
1361 | 1365 | |
1362 | 1366 | // Stores the seek time request, Updated by the doSeek function |
1363 | | - 'seek_time_sec' : 0, |
| 1367 | + 'serverSeekTime' : 0, |
1364 | 1368 | |
1365 | 1369 | // If the embedPlayer is current 'seeking' |
1366 | 1370 | 'seeking' : false, |
— | — | @@ -1390,14 +1394,18 @@ |
1391 | 1395 | customAttributes = { }; |
1392 | 1396 | } |
1393 | 1397 | |
1394 | | - var playerAttributes = mw.getConfig( 'embedPlayerAttributes' ); |
1395 | | - |
| 1398 | + var playerAttributes = mw.getConfig( 'EmbedPlayer.Attributes' ); |
1396 | 1399 | // Setup the player Interface from supported attributes: |
1397 | 1400 | for ( var attr in playerAttributes ) { |
1398 | 1401 | if ( customAttributes[ attr ] || customAttributes[ attr ] === false ) { |
1399 | 1402 | this[ attr ] = customAttributes[ attr ]; |
1400 | | - } else if ( element.getAttribute( attr ) ) { |
1401 | | - this[ attr ] = element.getAttribute( attr ); |
| 1403 | + } else if ( element.getAttribute( attr ) != null ) { |
| 1404 | + // boolean attributes |
| 1405 | + if( element.getAttribute( attr ) == '' ){ |
| 1406 | + this[ attr ] = true; |
| 1407 | + } else { |
| 1408 | + this[ attr ] = element.getAttribute( attr ); |
| 1409 | + } |
1402 | 1410 | } else { |
1403 | 1411 | this[attr] = playerAttributes[attr]; |
1404 | 1412 | } |
— | — | @@ -1612,7 +1620,7 @@ |
1613 | 1621 | // Scope the end of check for player sources so it can be called in a callback |
1614 | 1622 | var finishCheckPlayerSources = function(){ |
1615 | 1623 | // Run embedPlayer sources hook |
1616 | | - mw.runTriggersCallback( _this, 'checkPlayerSourcesEvent', function(){ |
| 1624 | + mw.runTriggersCallback( _this, 'checkPlayerSourcesEvent', function(){ |
1617 | 1625 | _this.checkForTimedText(); |
1618 | 1626 | }) |
1619 | 1627 | } |
— | — | @@ -1643,7 +1651,7 @@ |
1644 | 1652 | |
1645 | 1653 | // Set local apiProvider via config if not defined |
1646 | 1654 | if( !_this.apiProvider ) { |
1647 | | - _this.apiProvider = 'local'; |
| 1655 | + _this.apiProvider = mw.getConfig( 'EmbedPlayer.ApiProvider' ); |
1648 | 1656 | } |
1649 | 1657 | |
1650 | 1658 | // Setup the request |
— | — | @@ -1930,7 +1938,8 @@ |
1931 | 1939 | }, |
1932 | 1940 | |
1933 | 1941 | /** |
1934 | | - * Seek function (should be implemented by embed player interface ) |
| 1942 | + * Seek function ( should be implemented by embedPlayer interface playerNative, playerKplayer etc. ) |
| 1943 | + * embedPlayer doSeek only handles URL time seeks |
1935 | 1944 | */ |
1936 | 1945 | doSeek: function( percent ) { |
1937 | 1946 | var _this = this; |
— | — | @@ -1940,18 +1949,21 @@ |
1941 | 1950 | $j( this.embedPlayer ).trigger( 'onSeek' ); |
1942 | 1951 | |
1943 | 1952 | // See if we should do a server side seek ( player independent ) |
1944 | | - if ( this.supportsURLTimeEncoding() ) { |
1945 | | - // Make sure this.seek_time_sec is up-to-date: |
1946 | | - this.seek_time_sec = mw.npt2seconds( this.start_npt ) + parseFloat( percent * this.getDuration() ); |
1947 | | - mw.log( 'EmbedPlayer::doSeek:: updated seek_time_sec: ' + mw.seconds2npt ( this.seek_time_sec ) ); |
| 1953 | + if ( this.supportsURLTimeEncoding() ) { |
| 1954 | + mw.log( 'EmbedPlayer::doSeek:: updated serverSeekTime: ' + mw.seconds2npt ( this.serverSeekTime ) ); |
1948 | 1955 | this.stop(); |
1949 | 1956 | this.didSeekJump = true; |
| 1957 | + // Make sure this.serverSeekTime is up-to-date: |
| 1958 | + this.serverSeekTime = mw.npt2seconds( this.start_npt ) + parseFloat( percent * this.getDuration() ); |
1950 | 1959 | // Update the slider |
1951 | | - this.updatePlayHead( percent ); |
1952 | | - } |
| 1960 | + this.updatePlayHead( percent ); |
| 1961 | + } |
| 1962 | + |
1953 | 1963 | // Do play request in 100ms ( give the dom time to swap out the embed player ) |
1954 | | - setTimeout( function() { |
| 1964 | + setTimeout( function() { |
| 1965 | + _this.seeking = false; |
1955 | 1966 | _this.play() |
| 1967 | + _this.monitor(); |
1956 | 1968 | }, 100 ); |
1957 | 1969 | |
1958 | 1970 | // Run the onSeeking interface update |
— | — | @@ -2050,7 +2062,7 @@ |
2051 | 2063 | |
2052 | 2064 | // Stop the clip (load the thumbnail etc) |
2053 | 2065 | this.stop(); |
2054 | | - this.seek_time_sec = 0; |
| 2066 | + this.serverSeekTime = 0; |
2055 | 2067 | this.updatePlayHead( 0 ); |
2056 | 2068 | |
2057 | 2069 | // Make sure we are not in preview mode( no end clip actions in preview mode) |
— | — | @@ -2215,9 +2227,9 @@ |
2216 | 2228 | |
2217 | 2229 | // reset seek_offset: |
2218 | 2230 | if ( this.mediaElement.selectedSource.URLTimeEncoding ) { |
2219 | | - this.seek_time_sec = 0; |
| 2231 | + this.serverSeekTime = 0; |
2220 | 2232 | } else { |
2221 | | - this.seek_time_sec = mw.npt2seconds( start_npt ); |
| 2233 | + this.serverSeekTime = mw.npt2seconds( start_npt ); |
2222 | 2234 | } |
2223 | 2235 | }, |
2224 | 2236 | |
— | — | @@ -2773,8 +2785,8 @@ |
2774 | 2786 | // no longer seeking: |
2775 | 2787 | this.didSeekJump = false; |
2776 | 2788 | |
2777 | | - // reset current time and prev time |
2778 | | - this.currentTime = this.previousTime = 0; |
| 2789 | + // reset current time and prev time and seek offset |
| 2790 | + this.currentTime = this.previousTime = this.serverSeekTime = 0; |
2779 | 2791 | |
2780 | 2792 | // Previous player set time |
2781 | 2793 | |
— | — | @@ -2979,7 +2991,12 @@ |
2980 | 2992 | |
2981 | 2993 | // Update currentTime via embedPlayer |
2982 | 2994 | _this.currentTime = _this.getPlayerElementTime(); |
2983 | | - |
| 2995 | + |
| 2996 | + // Update any offsets from server seek |
| 2997 | + if( _this.serverSeekTime && _this.supportsURLTimeEncoding ){ |
| 2998 | + _this.currentTime = _this.serverSeekTime + _this.getPlayerElementTime() |
| 2999 | + } |
| 3000 | + |
2984 | 3001 | // Update the previousTime ( so we can know if the user-javascript changed currentTime ) |
2985 | 3002 | _this.previousTime = _this.currentTime; |
2986 | 3003 | |
— | — | @@ -3004,7 +3021,7 @@ |
3005 | 3022 | _this.muted = _this.getPlayerElementMuted(); |
3006 | 3023 | } |
3007 | 3024 | |
3008 | | - //mw.log( 'Monitor:: ' + this.currentTime + ' duration: ' + ( parseInt( this.getDuration() ) + 1 ) + ' is seek: ' + this.seeking ); |
| 3025 | + //mw.log( 'Monitor:: ' + this.currentTime + ' duration: ' + ( parseInt( this.getDuration() ) + 1 ) + ' is seeking: ' + this.seeking ); |
3009 | 3026 | if ( this.currentTime >= 0 && this.duration ) { |
3010 | 3027 | if ( !this.userSlide && !this.seeking ) { |
3011 | 3028 | if ( parseInt( this.startOffset ) != 0 ) { |
— | — | @@ -3054,7 +3071,8 @@ |
3055 | 3072 | if( ! this.isStopped() ) { |
3056 | 3073 | if( !this.monitorInterval ){ |
3057 | 3074 | this.monitorInterval = setInterval( function(){ |
3058 | | - _this.monitor(); |
| 3075 | + if( _this.monitor ) |
| 3076 | + _this.monitor(); |
3059 | 3077 | }, this.monitorRate ) |
3060 | 3078 | } |
3061 | 3079 | } else { |
— | — | @@ -3163,9 +3181,9 @@ |
3164 | 3182 | } ).show(); |
3165 | 3183 | |
3166 | 3184 | this.jump_time = options['start']; |
3167 | | - this.seek_time_sec = mw.npt2seconds( options['start'] ); |
| 3185 | + this.serverSeekTime = mw.npt2seconds( options['start'] ); |
3168 | 3186 | // trim output to |
3169 | | - this.controlBuilder.setStatus( gM( 'mwe-embedplayer-seek_to', mw.seconds2npt( this.seek_time_sec ) ) ); |
| 3187 | + this.controlBuilder.setStatus( gM( 'mwe-embedplayer-seek_to', mw.seconds2npt( this.serverSeekTime ) ) ); |
3170 | 3188 | mw.log( 'DO update: ' + this.jump_time ); |
3171 | 3189 | this.updateThumbTime( rel_start_sec ); |
3172 | 3190 | }, |
— | — | @@ -3191,7 +3209,7 @@ |
3192 | 3210 | */ |
3193 | 3211 | getSrc: function() { |
3194 | 3212 | if( this.mediaElement.selectedSource ){ |
3195 | | - return this.mediaElement.selectedSource.getSrc( this.seek_time_sec ); |
| 3213 | + return this.mediaElement.selectedSource.getSrc( this.serverSeekTime ); |
3196 | 3214 | } |
3197 | 3215 | return false; |
3198 | 3216 | }, |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js |
— | — | @@ -323,7 +323,7 @@ |
324 | 324 | }, |
325 | 325 | |
326 | 326 | /** |
327 | | - * Show the credit screen (presently specific to kaltura skin ) |
| 327 | + * Show the credit screen ( presently specific to kaltura skin ) |
328 | 328 | */ |
329 | 329 | showCredits: function() { |
330 | 330 | // Set up the shortcuts: |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerKplayer.js |
— | — | @@ -207,6 +207,16 @@ |
208 | 208 | */ |
209 | 209 | doSeek: function( percentage ) { |
210 | 210 | var _this = this; |
| 211 | + if ( this.supportsURLTimeEncoding() ){ |
| 212 | + // Make sure we could not do a local seek instead: |
| 213 | + if ( !( percentage < this.bufferedPercent && this.playerElement.duration && !this.didSeekJump )) { |
| 214 | + // We support URLTimeEncoding call parent seek: |
| 215 | + this.parent_doSeek( percentage ); |
| 216 | + return; |
| 217 | + } |
| 218 | + } |
| 219 | + |
| 220 | + |
211 | 221 | if( this.playerElement ) { |
212 | 222 | var seekTime = percentage * this.getDuration(); |
213 | 223 | |
Index: branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php |
— | — | @@ -12,10 +12,12 @@ |
13 | 13 | |
14 | 14 | 'mwe-sequencer-visual-editor'=> "Visual sequence editor", |
15 | 15 | 'mwe-sequencer-text-editor-warn'=> 'Text XML editor ( not recommended ) ', |
| 16 | + 'mwe-sequencer-restore-text-edit' => '[$1 Restore text editor] ( note this <i>highly</i> recommended that you use the visual editor )', |
| 17 | + |
16 | 18 | 'mwe-sequencer-loading-timeline' => 'Loading timeline ...', |
17 | 19 | 'mwe-sequencer-loading-player' => 'Loading player ...', |
18 | 20 | 'mwe-sequencer-loading-menu' => 'Loading menu ...', |
19 | | - 'mwe-sequencer-loading-asset' => 'Loading asset ...', |
| 21 | + 'mwe-sequencer-loading-asset' => 'Loading asset ...', |
20 | 22 | |
21 | 23 | 'mwe-sequencer-no_selected_resource' => '<h3>No resource selected</h3> Select a clip to enable editing.', |
22 | 24 | 'mwe-sequencer-untitled-sequence' => 'Untitled sequence', |
— | — | @@ -84,11 +86,11 @@ |
85 | 87 | 'mwe-sequencer-save_done' => 'Save complete', |
86 | 88 | |
87 | 89 | 'mwe-sequencer-open-summary' => "Enter the name of the sequence you would like to open", |
88 | | - |
| 90 | + 'mwe-sequencer-new-summary' => "Enter the name of the sequence you would like to create", |
89 | 91 | |
90 | 92 | |
91 | | - 'mwe-sequencer-not-published' => 'This sequence has not yet been published. <i>Browser preview is shown</i>. <b>[$1 Review and publish this sequence]</b>.', |
92 | | - 'mwe-sequencer-published-out-of-date' =>'This published sequence is not the most recent version. You can <b>[$1 review and publish]</b> the most recent version.', |
| 93 | + 'mwe-sequencer-not-published' => 'This sequence has not yet been published. Select <i>sequence -> publish</i> in the <b>[$1 sequence editor]</b> to publish this sequence.', |
| 94 | + 'mwe-sequencer-published-out-of-date' =>'This published sequence is not the most recent version. Select <i>sequence -> publish</i> in the <b>[$1 sequence editor]</b> to publish this sequence', |
93 | 95 | |
94 | 96 | 'mwe-sequencer-already-published' => "The most recent version of this sequence is already published", |
95 | 97 | |
Index: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsSequence.js |
— | — | @@ -15,8 +15,73 @@ |
16 | 16 | init: function( sequencer ) { |
17 | 17 | this.sequencer = sequencer; |
18 | 18 | }, |
19 | | - |
20 | 19 | /** |
| 20 | + * present an new dialog to the user and open the sequence in a new window |
| 21 | + * ( presently very similar to open ) |
| 22 | + */ |
| 23 | + newSequence : function(){ |
| 24 | + var _this = this; |
| 25 | + var $content = $j('<div />').append( |
| 26 | + gM('mwe-sequencer-new-summary' ), |
| 27 | + $j('<input />') |
| 28 | + .css({ 'width': 400 }) |
| 29 | + .attr({ |
| 30 | + 'id' : 'sequenceNewNameInput', |
| 31 | + 'maxlength': 255 |
| 32 | + }) |
| 33 | + // Make sure keys press does not affect the sequencer interface |
| 34 | + .sequencerInput( _this.sequencer ) |
| 35 | + ); |
| 36 | + // XXX todo we should have an autocomplete on sequence name! |
| 37 | + |
| 38 | + var buttons = {}; |
| 39 | + buttons[ gM('mwe-cancel') ] = function(){ $j( this ).dialog( 'cancel' ) }; |
| 40 | + |
| 41 | + // For now just support server based open .. ideally we could browse for file |
| 42 | + var $dialog = mw.addDialog({ |
| 43 | + 'resizable':'true', |
| 44 | + 'title' : gM('mwe-sequencer-menu-sequence-new-desc'), |
| 45 | + 'content' : $content, |
| 46 | + 'buttons' : buttons, |
| 47 | + 'width' : 450 |
| 48 | + }); |
| 49 | + // Add a special open button |
| 50 | + $dialog.parent().find( '.ui-dialog-buttonpane' ).prepend( |
| 51 | + $j.button({ |
| 52 | + 'icon' : 'document', |
| 53 | + 'text' : gM('mwe-sequencer-menu-sequence-new') |
| 54 | + }) |
| 55 | + // Match button layout |
| 56 | + .css({ |
| 57 | + 'margin':'0.5em 0.4em 0.5em 0', |
| 58 | + 'padding' : '0.2em 1.4em 0.3em' |
| 59 | + }) |
| 60 | + .attr({ |
| 61 | + 'id' : 'sequenceOpenButton', |
| 62 | + 'target' : '_new', |
| 63 | + 'href' : '#' |
| 64 | + }).click( function(){ |
| 65 | + // Update the link |
| 66 | + $j(this).attr({ |
| 67 | + 'href': |
| 68 | + mw.getRemoteSequencerLink( |
| 69 | + mw.escapeQuotesHTML( |
| 70 | + _this.sequencer.getServer().getSequenceEditUrl( |
| 71 | + // ( Sequence: is automatically pre-appended with getSequencePageUrl |
| 72 | + // ( don't use Sequence: in the title ) |
| 73 | + $j('#sequenceNewNameInput').val().replace(/Sequence:/i, '') |
| 74 | + ) |
| 75 | + ) |
| 76 | + ) |
| 77 | + }); |
| 78 | + // Close the dialog |
| 79 | + $j(this).dialog( 'close' ); |
| 80 | + // Follow the link |
| 81 | + return true; |
| 82 | + }) |
| 83 | + ) |
| 84 | + }, |
| 85 | + /** |
21 | 86 | * present an open dialog to the user, and open the sequence in a new window |
22 | 87 | */ |
23 | 88 | open: function(){ |
— | — | @@ -412,7 +477,7 @@ |
413 | 478 | if( _this.sequencer.getOption('onExitCallback') ){ |
414 | 479 | // Send a flag of weather the sequence 'changed' or not |
415 | 480 | _this.sequencer.getOption('onExitCallback')( |
416 | | - _this.sequencer.getServer().hasSequenceBeenSaved() |
| 481 | + _this.sequencer.getServer().hasSequenceBeenSavedOrPublished() |
417 | 482 | ); |
418 | 483 | } |
419 | 484 | $j( this ).remove(); |
Index: branches/MwEmbedStandAlone/modules/Sequencer/actions/mw.SequencerActionsEdit.js |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | |
78 | 78 | // Enable the undo option: |
79 | 79 | this.sequencer.getMenu().enableMenuItem( 'edit', 'undo' ); |
80 | | - this.sequencer.getMenu().enableMenuItem( 'sequencer', 'save' ); |
| 80 | + this.sequencer.getMenu().enableMenuItem( 'sequence', 'save' ); |
81 | 81 | }, |
82 | 82 | |
83 | 83 | /** |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | 'save_divider': 'divider', |
38 | 38 | 'save' : { |
39 | 39 | 'icon' : 'disk', |
40 | | - 'disabled' : true, |
| 40 | + 'disabled' : false, |
41 | 41 | 'shortCut' : 'ctrl S', |
42 | 42 | 'action' : function( _this ){ |
43 | 43 | mw.log("SequencerMenu::save"); |
— | — | @@ -279,6 +279,9 @@ |
280 | 280 | }, |
281 | 281 | |
282 | 282 | enableMenuItem: function( menuKey, menuItemKey ){ |
| 283 | + if( !this.menuConfig[ menuKey ] || !this.menuConfig[ menuKey ][ menuItemKey ] ){ |
| 284 | + mw.log("Error: SequencerMenu: " + menuKey + ' ' + menuItemKey + ' is not defined'); |
| 285 | + } |
283 | 286 | this.menuConfig[ menuKey ][ menuItemKey ].disabled = false; |
284 | 287 | $menuItemTarget = $j('#' + this.getMenuItemId( menuKey, menuItemKey ) ); |
285 | 288 | |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js |
— | — | @@ -100,11 +100,11 @@ |
101 | 101 | hasLocalChanges: function(){ |
102 | 102 | return ( this.serverSmilXml != this.sequencer.getSmil().getXMLString() ); |
103 | 103 | }, |
104 | | - // Check if the sequence was saved in this edit sesssion |
105 | | - hasSequenceBeenSaved: function(){ |
106 | | - return this.sequenceSaved; |
| 104 | + // Check if the sequence was saved in this edit session |
| 105 | + hasSequenceBeenSavedOrPublished: function(){ |
| 106 | + return this.sequenceSaved || this.sequencePublished |
107 | 107 | }, |
108 | | - // Get a save token, if unable to do so return false |
| 108 | + // Get a save token, if unable to do so return false |
109 | 109 | getSaveToken: function( callback ){ |
110 | 110 | var _this = this; |
111 | 111 | if( this.saveToken != null ){ |
— | — | @@ -196,8 +196,9 @@ |
197 | 197 | 'prop':'revisions', |
198 | 198 | 'titles' : _this.titleKey, |
199 | 199 | 'rvprop' : 'user|comment|timestamp' |
200 | | - }; |
| 200 | + }; |
201 | 201 | mw.getJSON( _this.getApiUrl(), request, function( data ) { |
| 202 | + debugger; |
202 | 203 | if( data.query && data.pages ){ |
203 | 204 | for( page_id in data.pages ){ |
204 | 205 | var page = data.pages[page_id]; |
— | — | @@ -227,13 +228,8 @@ |
228 | 229 | * Get the sequencer 'edit' url |
229 | 230 | */ |
230 | 231 | getSequenceEditUrl: function( titleKey ){ |
231 | | - if( !titleKey ) |
232 | | - titleKey = this.titleKey; |
233 | | - // Check that we have a pagePathUrl config: |
234 | | - if( !this.pagePathUrl ){ |
235 | | - return false; |
236 | | - } |
237 | | - return this.pagePathUrl.replace( '$1', 'Sequence:' + titleKey); |
| 232 | + var viewUrl = this.getSequenceViewUrl( titleKey ); |
| 233 | + return mw.replaceUrlParams(viewUrl, {'action':'edit'}) |
238 | 234 | }, |
239 | 235 | |
240 | 236 | /** |
— | — | @@ -262,6 +258,10 @@ |
263 | 259 | callback( _this.getApiUrl(), request ); |
264 | 260 | }); |
265 | 261 | }); |
| 262 | + }, |
| 263 | + // Setter for sequencePublished |
| 264 | + sequencePublishUploadDone: function(){ |
| 265 | + this.sequencePublished = true; |
266 | 266 | } |
267 | 267 | } |
268 | 268 | |
Index: branches/MwEmbedStandAlone/modules/Sequencer/remotes/mw.MediaWikiRemoteSequencer.js |
— | — | @@ -11,11 +11,13 @@ |
12 | 12 | "mwe-sequencer-edit-sequence", |
13 | 13 | "mwe-sequencer-embed-sequence", |
14 | 14 | "mwe-sequencer-embed-sequence-desc", |
15 | | - "mwe-sequencer-loading-sequencer", |
| 15 | + "mwe-sequencer-loading-sequencer", |
16 | 16 | |
17 | 17 | "mwe-sequencer-visual-editor", |
18 | 18 | "mwe-sequencer-text-editor-warn", |
| 19 | + "mwe-sequencer-restore-text-edit", |
19 | 20 | |
| 21 | + "mwe-sequencer-loading-publish-render", |
20 | 22 | |
21 | 23 | "mwe-sequencer-not-published", |
22 | 24 | "mwe-sequencer-published-out-of-date" |
— | — | @@ -55,7 +57,8 @@ |
56 | 58 | this.target = ( options.target )? options.target : this.target; |
57 | 59 | }, |
58 | 60 | |
59 | | - drawUI: function() { |
| 61 | + drawUI: function() { |
| 62 | + |
60 | 63 | // Check page action |
61 | 64 | if( this.action == 'view' ) { |
62 | 65 | this.showViewUI(); |
— | — | @@ -101,34 +104,44 @@ |
102 | 105 | }, |
103 | 106 | |
104 | 107 | showEditUI: function(){ |
105 | | - |
| 108 | + var _this = this; |
106 | 109 | $j('#bodyContent').prepend( |
107 | 110 | // Append switch visual / text editor links |
108 | | - $j('<div />') |
| 111 | + /*$j('<div />') |
109 | 112 | .append( |
110 | 113 | $j.button({ |
111 | 114 | 'icon' : 'video', |
112 | 115 | 'text' : gM( "mwe-sequencer-visual-editor") |
113 | 116 | }).click( function(){ |
114 | | - $j('#sequencerContainer').show(); |
115 | | - $j('#editform').hide(); |
| 117 | + $j('#editform').hide(); |
| 118 | + $j('#sequencerContainer').show(); |
116 | 119 | }), |
117 | 120 | $j.button({ |
118 | | - 'icon' : 'script' |
| 121 | + 'icon' : 'script', |
119 | 122 | 'text' : gM("mwe-sequencer-text-editor-warn") |
120 | 123 | }).click(function(){ |
121 | 124 | $j('#sequencerContainer').hide(); |
122 | 125 | $j('#editform').show(); |
123 | | - }), |
124 | | - $j('<div />') |
125 | | - .css({ |
126 | | - 'width' : '100%', |
127 | | - 'height' : '700px' |
128 | | - }) |
129 | | - .attr({ |
130 | | - 'id', 'sequencerContainer' |
131 | | - }) |
| 126 | + }) |
| 127 | + )*/ |
| 128 | + ).append( |
| 129 | + $j('<div />') |
| 130 | + .css({ |
| 131 | + 'position' : 'relative', |
| 132 | + 'width' : '100%', |
| 133 | + 'height' : '620px' |
| 134 | + }) |
| 135 | + .attr({ |
| 136 | + 'id': 'sequencerContainer' |
| 137 | + }), |
| 138 | + $j('<div />') |
| 139 | + .append( |
| 140 | + gM("mwe-sequencer-restore-text-edit", $j('<a />').click(function(){ |
| 141 | + $j('#sequencerContainer').hide(); |
| 142 | + $j('#editform').show(); |
| 143 | + }) ) |
132 | 144 | ) |
| 145 | + .css( {'cursor': 'pointer', 'font-size':'x-small' }) |
133 | 146 | ); |
134 | 147 | // load the sequence editor with the sequencerContainer target |
135 | 148 | mw.load( 'Sequencer', function(){ |
— | — | @@ -161,65 +174,73 @@ |
162 | 175 | // no flattened file found |
163 | 176 | $embedPlayer.append( |
164 | 177 | $j( '<div />').append( |
165 | | - gM('mwe-sequencer-not-published') |
| 178 | + gM('mwe-sequencer-not-published', |
| 179 | + $j('<a />').click( function(){ |
| 180 | + _this.showEditor(); |
| 181 | + }) |
| 182 | + ) |
166 | 183 | ) |
167 | 184 | .addClass( 'ui-state-highlight' ) |
168 | | - ) |
169 | | - return ; |
170 | | - } |
171 | | - for( var pageId in data.query.pages) { |
172 | | - var page = data.query.pages[ pageId ]; |
173 | | - |
174 | | - // Check that the file has a later revision than the |
175 | | - // page. ( up to date sequences always are later than |
176 | | - // the revision of the page saved ). |
177 | | - if( page.revisions && page.revisions[0] ){ |
178 | | - if( page.revisions[0].revid < wgCurRevisionId ){ |
179 | | - // flattened file out of date |
180 | | - $embedPlayer.append( |
181 | | - $j('<div />').append( |
182 | | - gM('mwe-sequencer-published-out-of-date') |
183 | | - ).addClass( 'ui-state-highlight' ) |
184 | | - ) |
| 185 | + ) |
| 186 | + } else { |
| 187 | + for( var pageId in data.query.pages) { |
| 188 | + var page = data.query.pages[ pageId ]; |
| 189 | + |
| 190 | + // Check that the file has a later revision than the |
| 191 | + // page. ( up to date sequences always are later than |
| 192 | + // the revision of the page saved ). |
| 193 | + if( page.revisions && page.revisions[0] ){ |
| 194 | + if( page.revisions[0].revid < wgCurRevisionId ){ |
| 195 | + // flattened file out of date |
| 196 | + $embedPlayer.append( |
| 197 | + $j('<div />').append( |
| 198 | + gM('mwe-sequencer-published-out-of-date', |
| 199 | + $j('<a />').click( function(){ |
| 200 | + _this.showEditor(); |
| 201 | + }) |
| 202 | + ) |
| 203 | + ).addClass( 'ui-state-highlight' ) |
| 204 | + ) |
| 205 | + } |
185 | 206 | } |
186 | | - } |
187 | | - if( page.imageinfo && page.imageinfo[0] ){ |
188 | | - var imageinfo = page.imageinfo[0]; |
189 | | - var duration = 0; |
190 | | - for( var i=0;i< imageinfo.metadata.length; i++){ |
191 | | - if( imageinfo.metadata[i].name == 'length' ){ |
192 | | - duration = Math.round( |
193 | | - imageinfo.metadata[i].value * 1000 |
194 | | - ) / 1000; |
| 207 | + if( page.imageinfo && page.imageinfo[0] ){ |
| 208 | + var imageinfo = page.imageinfo[0]; |
| 209 | + var duration = 0; |
| 210 | + for( var i=0;i< imageinfo.metadata.length; i++){ |
| 211 | + if( imageinfo.metadata[i].name == 'length' ){ |
| 212 | + duration = Math.round( |
| 213 | + imageinfo.metadata[i].value * 1000 |
| 214 | + ) / 1000; |
| 215 | + } |
195 | 216 | } |
| 217 | + // Append a player to the embedPlayer target |
| 218 | + // -- special title key sequence name bound |
| 219 | + $embedPlayer.append( |
| 220 | + $j('<video />') |
| 221 | + .attr({ |
| 222 | + 'id' : 'embedSequencePlayer', |
| 223 | + 'poster' : imageinfo.thumburl, |
| 224 | + 'durationHint' : duration, |
| 225 | + 'apiTitleKey' : page.title.replace('File:',''), |
| 226 | + }) |
| 227 | + .addClass('kskin') |
| 228 | + .css({ |
| 229 | + 'width': imageinfo.thumbwidth, |
| 230 | + 'height' : imageinfo.thumbheight |
| 231 | + }) |
| 232 | + .append( |
| 233 | + // ogg source |
| 234 | + $j('<source />') |
| 235 | + .attr({ |
| 236 | + 'type': 'video/ogg', |
| 237 | + 'src' : imageinfo.url |
| 238 | + }) |
| 239 | + ) |
| 240 | + ) |
196 | 241 | } |
197 | | - // Append a player to the embedPlayer target |
198 | | - // -- special title key sequence name bound |
199 | | - $embedPlayer.append( |
200 | | - $j('<video />') |
201 | | - .attr({ |
202 | | - 'id' : 'embedSequencePlayer', |
203 | | - 'poster' : imageinfo.thumburl, |
204 | | - 'durationHint' : duration, |
205 | | - 'apiTitleKey' : page.title.replace('File:',''), |
206 | | - }) |
207 | | - .addClass('kskin') |
208 | | - .css({ |
209 | | - 'width': imageinfo.thumbwidth, |
210 | | - 'height' : imageinfo.thumbheight |
211 | | - }) |
212 | | - .append( |
213 | | - // ogg source |
214 | | - $j('<source />') |
215 | | - .attr({ |
216 | | - 'type': 'video/ogg', |
217 | | - 'src' : imageinfo.url |
218 | | - }) |
219 | | - ) |
220 | | - ) |
221 | | - } |
222 | | - } |
223 | | - var width = ( imageinfo.thumbwidth )?imageinfo.thumbwidth : '400px'; |
| 242 | + } |
| 243 | + } |
| 244 | + var width = ( imageinfo && imageinfo.thumbwidth )?imageinfo.thumbwidth : '400px'; |
224 | 245 | // Display embed sequence |
225 | 246 | $j( _this.target ).empty().append( |
226 | 247 | $j('<div />') |
— | — | @@ -294,9 +315,8 @@ |
295 | 316 | ) |
296 | 317 | .css( {'width':'200px', 'margin':'auto'}) |
297 | 318 | ) |
298 | | - ) |
299 | | - mw.load( 'Sequencer', function(){ |
300 | | - var _this = this; |
| 319 | + ) |
| 320 | + mw.load( 'Sequencer', function(){ |
301 | 321 | // Send a jquery ui style destroy command ( in case the editor is re-invoked ) |
302 | 322 | $j('#edit_sequence_container').sequencer( 'destroy'); |
303 | 323 | $j('#edit_sequence_container').sequencer( _this.getSequencerConfig() ); |
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -132,11 +132,12 @@ |
133 | 133 | if( wgAction == 'edit' ){ |
134 | 134 | mwAddCommonStyleSheet(); |
135 | 135 | var body = document.getElementById( 'bodyContent' ); |
136 | | - body.innerHTML = "<div class=\"loadingSpinner\"></div>" + body.innerHTML; |
| 136 | + body.innerHTML = "<div class=\"loadingSpinner sequenceLoader\"></div>" + body.innerHTML; |
137 | 137 | } |
138 | 138 | loadMwEmbed( [ 'mw.MediaWikiRemoteSequencer' ], function(){ |
139 | | - $j('.loadingSpinner').remove(); |
140 | | - $j('#editform').hide(); |
| 139 | + $j('#editform,.mw-newarticletext').hide(); |
| 140 | + $j('.sequenceLoader').hide(); |
| 141 | + |
141 | 142 | var remote = new mw.MediaWikiRemoteSequencer({ |
142 | 143 | 'action': wgAction, |
143 | 144 | 'title' : wgTitle, |