Index: branches/MwEmbedStandAlone/mwEmbedFrame.php |
— | — | @@ -13,10 +13,6 @@ |
14 | 14 | * <iframe src="mwEmbedFrame.php?src={SRC URL}&poster={POSTER URL}&width={WIDTH}etc"> </iframe> |
15 | 15 | */ |
16 | 16 | |
17 | | -//Setup the script local script cache directory |
18 | | -// ( has to be hard coded rather than config based for fast non-mediawiki config hits ) |
19 | | -$wgScriptCacheDirectory = realpath( dirname( __FILE__ ) ) . '/includes/cache'; |
20 | | - |
21 | 17 | // Setup the mwEmbedFrame |
22 | 18 | $myMwEmbedFrame = new mwEmbedFrame(); |
23 | 19 | |
Index: branches/MwEmbedStandAlone/localSettings.js |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +/** |
| 3 | +* Local Setting file hosts any per site configuration |
| 4 | +* |
| 5 | +* This file is automatically included in any resourceLoader or mwEmbed.js request |
| 6 | +* |
| 7 | +* You can put any mw.setConfig('moduleOption', value ) calls in here. |
| 8 | +* |
| 9 | +* In a fresh svn checkout this file will always be empty. |
| 10 | +*/ |
Index: branches/MwEmbedStandAlone/mwEmbed.js |
— | — | @@ -2153,18 +2153,24 @@ |
2154 | 2154 | |
2155 | 2155 | } |
2156 | 2156 | if ( ! langLoaderRequest.length ) { |
2157 | | - callback(); |
| 2157 | + addLocalSettings(); |
2158 | 2158 | return ; |
2159 | 2159 | } |
2160 | 2160 | |
2161 | 2161 | // Load the launage if set |
2162 | 2162 | mw.load( langLoaderRequest, function(){ |
2163 | | - mw.log( 'Done moduleLoaderCheck request' ); |
| 2163 | + mw.log( 'Done moduleLoaderCheck request' ); |
| 2164 | + addLocalSettings(); |
| 2165 | + } ); |
| 2166 | + } |
| 2167 | + function addLocalSettings(){ |
| 2168 | + mw.log("Load loacal settings") |
| 2169 | + mw.load( 'localSettings.js', function(){ |
2164 | 2170 | // Set the mwModuleLoaderCheckFlag flag to true |
2165 | | - mwModuleLoaderCheckFlag = true; |
| 2171 | + mwModuleLoaderCheckFlag = true; |
2166 | 2172 | callback(); |
2167 | | - } ); |
2168 | | - } |
| 2173 | + }) |
| 2174 | + } |
2169 | 2175 | |
2170 | 2176 | } |
2171 | 2177 | |
Index: branches/MwEmbedStandAlone/ResourceLoader.php |
— | — | @@ -151,8 +151,16 @@ |
152 | 152 | |
153 | 153 | // Output the current language resource js |
154 | 154 | $this->output .= NamedResourceLoader::getLanguageJs( $this->langCode ); |
155 | | - |
156 | | - // Add the required core mwEmbed style sheets Commted out |
| 155 | + |
| 156 | + // Output the localSettings.js |
| 157 | + $localSettingsJsPath = realpath( dirname( __FILE__ ) ) . '/localSettings.js'; |
| 158 | + if( is_file( $localSettingsJsPath ) ){ |
| 159 | + wfSuppressWarnings(); |
| 160 | + $this->output .= file_get_contents( $localSettingsJsPath ); |
| 161 | + wfRestoreWarnings(); |
| 162 | + } |
| 163 | + |
| 164 | + // Add the required core mwEmbed style sheets removed for now |
157 | 165 | // because when creating stand alone packages js package with css |
158 | 166 | // the paths get messed up. |
159 | 167 | /* |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js |
— | — | @@ -39,7 +39,6 @@ |
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Checks if assets are insync |
43 | | - * re |
44 | 43 | */ |
45 | 44 | getPlaybackSyncDelta: function( time ){ |
46 | 45 | var _this = this; |
Index: branches/MwEmbedStandAlone/modules/AddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -331,9 +331,6 @@ |
332 | 332 | if ( size.width ) { |
333 | 333 | request['iiurlwidth'] = size.width; |
334 | 334 | } |
335 | | - if( size.height ){ |
336 | | - request['iiurlheight'] = size.height; |
337 | | - } |
338 | 335 | |
339 | 336 | mw.getJSON( this.provider.apiUrl, request, function( data ) { |
340 | 337 | var imObj = { }; |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | * Default player module configuration |
8 | 8 | */ |
9 | 9 | ( function( mw ) { |
| 10 | + window['MW_EMBED_LIBRARY_PAGE'] = 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library'; |
10 | 11 | |
11 | 12 | mw.setDefaultConfig( { |
12 | 13 | // If the player controls should be overlaid on top of the video ( if supported by playback method) |
— | — | @@ -25,8 +26,19 @@ |
26 | 27 | |
27 | 28 | // If the video player should attribute kaltura |
28 | 29 | "EmbedPlayer.KalturaAttribution" : true, |
| 30 | + |
| 31 | + // The attribution button |
| 32 | + 'EmbedPlayer.AttributionButton' :{ |
| 33 | + 'title' : 'Kaltura html5 video library', |
| 34 | + 'href' : MW_EMBED_LIBRARY_PAGE, |
| 35 | + // Style icon to be applied |
| 36 | + 'class' : 'kaltura-icon', |
| 37 | + // An icon image url ( should be a 16x16 image or data url ) |
| 38 | + 'iconurl' : false |
| 39 | + }, |
| 40 | + |
29 | 41 | |
30 | | - // Set the browser player warning flag to true by default ( applies to all players so its not part of attribute defaults above ) |
| 42 | + // Set the browser player warning flag displays warning for non optimal playback |
31 | 43 | "EmbedPlayer.ShowNativeWarning" : true, |
32 | 44 | |
33 | 45 | // If fullscreen is global enabled. |
— | — | @@ -137,7 +149,7 @@ |
138 | 150 | }); |
139 | 151 | // Load the embedPlayer module ( then run queued hooks ) |
140 | 152 | mw.load( 'EmbedPlayer', function ( ) { |
141 | | - mw.log("EmbedPlayer:: do rewrite tags"); |
| 153 | + mw.log("EmbedPlayer:: do rewrite players:" + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).length ); |
142 | 154 | // Rewrite the EmbedPlayer.RewriteTags with the |
143 | 155 | $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).embedPlayer(); |
144 | 156 | }) |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/tests/Player_IncludeJQuery.html |
— | — | @@ -0,0 +1,27 @@ |
| 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 src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js" type="text/javascript"></script> |
| 8 | +<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7/jquery-ui.min.js" type="text/javascript"></script> |
| 9 | +<script type="text/javascript" src="../../../mwEmbedLoader.js"></script> |
| 10 | +<script type="text/javascript"> |
| 11 | + $(document).ready(function(){ |
| 12 | + $('#test').text('jQuery $ supported' ); |
| 13 | + }); |
| 14 | +</script> |
| 15 | +</head> |
| 16 | +<body> |
| 17 | +<div id="test"></div> |
| 18 | + |
| 19 | +<video poster="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream.jpg" |
| 20 | + duration="10:53" preload="auto"> |
| 21 | + <source type="video/webm" src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream_400p.webm" /> |
| 22 | + <source type="video/h264" src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream_iphone.m4v" /> |
| 23 | + <source type="video/ogg" src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/elephants-dream_400p.ogv" /> |
| 24 | +</video> |
| 25 | + |
| 26 | + |
| 27 | +</body> |
| 28 | +</html> |
\ No newline at end of file |
Property changes on: branches/MwEmbedStandAlone/modules/EmbedPlayer/tests/Player_IncludeJQuery.html |
___________________________________________________________________ |
Added: svn:executable |
1 | 29 | + * |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -36,6 +36,8 @@ |
37 | 37 | "mwe-embedplayer-download_text" : "Download timed text", |
38 | 38 | "mwe-embedplayer-download" : "Download", |
39 | 39 | "mwe-embedplayer-share" : "Share", |
| 40 | + 'mwe-embedplayer-about-library' : 'About kaltura player', |
| 41 | + "mwe-embedplayer-about-library-desc" : 'Kaltura\'s HTML5 Media Library enables you to take advantage of the html5 <video> and <audio> tags today with a consistent player interface across all major browsers. <br> <br> [$1 More about the kaltura player library].', |
40 | 42 | "mwe-embedplayer-credits" : "Credits", |
41 | 43 | "mwe-embedplayer-clip_linkback" : "Clip source page", |
42 | 44 | "mwe-embedplayer-choose_player" : "Choose video player", |
— | — | @@ -335,7 +337,7 @@ |
336 | 338 | // Make sure we have user preference setup ( for setting preferences on video selection ) |
337 | 339 | mw.setupUserConfig( function() { |
338 | 340 | // Add each selected element to the player manager: |
339 | | - $j( playerSelect ).each( function( index, playerElement) { |
| 341 | + $j( playerSelect ).each( function( index, playerElement) { |
340 | 342 | // Make sure the video tag was not generated by our library: |
341 | 343 | if( $j( playerElement ).hasClass( 'nativeEmbedPlayerPid' ) ){ |
342 | 344 | $j('#loadingSpinner_' + $j( playerElement ).attr('id') ).hide(); |
— | — | @@ -478,8 +480,9 @@ |
479 | 481 | if( ranPlayerSwapFlag ){ |
480 | 482 | return ; |
481 | 483 | } |
| 484 | + ranPlayerSwapFlag = true; |
482 | 485 | mw.log("EmbedPlayer::runPlayerSwap::" + $j( playerElement ).attr('id') ); |
483 | | - ranPlayerSwapFlag = true; |
| 486 | + |
484 | 487 | var playerInterface = new mw.EmbedPlayer( playerElement , attributes); |
485 | 488 | |
486 | 489 | _this.swapEmbedPlayerElement( playerElement, playerInterface ); |
— | — | @@ -611,6 +614,7 @@ |
612 | 615 | if( playerInterface.shouldUseNativeControls() ) { |
613 | 616 | $j( targetElement ) |
614 | 617 | .attr('id', playerInterface.pid ) |
| 618 | + .addClass( 'nativeEmbedPlayerPid' ) |
615 | 619 | .after( |
616 | 620 | $j( swapPlayerElement ).css('display', 'none') |
617 | 621 | ) |
— | — | @@ -1480,7 +1484,7 @@ |
1481 | 1485 | |
1482 | 1486 | // Set the player size attributes based loaded video element: |
1483 | 1487 | this.setPlayerSize( element ); |
1484 | | - |
| 1488 | + |
1485 | 1489 | // Set the plugin id |
1486 | 1490 | this.pid = 'pid_' + this.id; |
1487 | 1491 | |
— | — | @@ -2693,15 +2697,18 @@ |
2694 | 2698 | _this.pause(); |
2695 | 2699 | } ) |
2696 | 2700 | .attr( 'title', gM( 'mwe-embedplayer-pause_clip' ) ); |
2697 | | - |
2698 | | - |
2699 | | - // If we previously finished playing this clip run the "replay hook" |
2700 | | - if( this.donePlayingCount > 0 ) { |
| 2701 | + |
| 2702 | + // Start the monitor if not already started |
| 2703 | + this.monitor(); |
| 2704 | + |
| 2705 | + // If we previously finished playing this clip run the "replay hook" |
| 2706 | + if( this.donePlayingCount > 0 ) { |
2701 | 2707 | mw.log("replayEvent"); |
2702 | 2708 | $j( this ).trigger( 'replayEvent' ); |
2703 | | - } |
| 2709 | + } |
2704 | 2710 | }, |
2705 | 2711 | |
| 2712 | + |
2706 | 2713 | /** |
2707 | 2714 | * Maps the html5 load request. There is no general way to "load" clips so |
2708 | 2715 | * underling plugin-player libs should override. |
— | — | @@ -3037,13 +3044,11 @@ |
3038 | 3045 | } |
3039 | 3046 | |
3040 | 3047 | // Call monitor at 250ms interval. ( use setInterval to avoid stacking monitor requests ) |
3041 | | - //mw.log("EmbedPlayer::monitor: continue?:" + !this.isStopped() + ' monitorInterval: ' + this.monitorInterval ); |
3042 | | - if( ! this.isStopped() ) { |
3043 | | - if( !this.monitorInterval ){ |
3044 | | - this.monitorInterval = setInterval( function(){ |
3045 | | - if( _this.monitor ){ |
| 3048 | + if( ! this.isStopped() ) { |
| 3049 | + if( !this.monitorInterval ){ |
| 3050 | + this.monitorInterval = setInterval( function(){ |
| 3051 | + if( _this.monitor ) |
3046 | 3052 | _this.monitor(); |
3047 | | - } |
3048 | 3053 | }, this.monitorRate ) |
3049 | 3054 | } |
3050 | 3055 | } else { |
— | — | @@ -3104,14 +3109,14 @@ |
3105 | 3110 | * |
3106 | 3111 | * @param {Float} perc Value between 0 and 1 for position of playhead |
3107 | 3112 | */ |
3108 | | - updatePlayHead: function( perc ) { |
| 3113 | + updatePlayHead: function( perc ) { |
3109 | 3114 | $playHead = this.$interface.find( '.play_head' ); |
3110 | 3115 | if ( this.controls && $playHead.length != 0 ) { |
3111 | 3116 | var val = parseInt( perc * 1000 ); |
3112 | 3117 | $playHead.slider( 'value', val ); |
3113 | 3118 | } |
3114 | | - // @@todo should fix this name: |
3115 | | - $j(this).trigger('updatePlayHeadPercent', perc); |
| 3119 | + // @@todo should have 'progress' trigger the same as html5 |
| 3120 | + $j( this ).trigger('updatePlayHeadPercent', perc); |
3116 | 3121 | }, |
3117 | 3122 | |
3118 | 3123 | /** |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js |
— | — | @@ -46,8 +46,8 @@ |
47 | 47 | 'volumeControl': { |
48 | 48 | 'w':40 |
49 | 49 | }, |
50 | | - // No kalturaAttribution component for kSkin ( its integrated into the credits screen ) |
51 | | - 'kalturaAttribution' : false, |
| 50 | + // No attributionButton component for kSkin ( its integrated into the credits screen ) |
| 51 | + 'attributionButton' : false, |
52 | 52 | |
53 | 53 | // Time display: |
54 | 54 | 'timeDisplay': { |
— | — | @@ -315,7 +315,7 @@ |
316 | 316 | ); |
317 | 317 | break; |
318 | 318 | case 'share': |
319 | | - embedPlayer.$interface.find( '.menu-share').html( |
| 319 | + embedPlayer.$interface.find( '.menu-share' ).html( |
320 | 320 | this.getShare() |
321 | 321 | ); |
322 | 322 | break; |
— | — | @@ -339,7 +339,7 @@ |
340 | 340 | .loadingSpinner() |
341 | 341 | ); |
342 | 342 | |
343 | | - if( mw.getConfig( 'EmbedPlayer.KalturaAttribution' ) == true ){ |
| 343 | + if( mw.getConfig( 'EmbedPlayer.KalturaAttribution' ) == true ){ |
344 | 344 | $target.append( |
345 | 345 | $j( '<div />' ) |
346 | 346 | .addClass( 'k-attribution' ) |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/mw.PlayerControlBuilder.js |
— | — | @@ -2,6 +2,7 @@ |
3 | 3 | * Msg text is inherited from embedPlayer |
4 | 4 | */ |
5 | 5 | |
| 6 | +( function( mw ) { |
6 | 7 | /** |
7 | 8 | * mw.PlayerControlBuilder object |
8 | 9 | * @param the embedPlayer element we are targeting |
— | — | @@ -43,7 +44,10 @@ |
44 | 45 | 'download' : true, |
45 | 46 | |
46 | 47 | // Share the video menu |
47 | | - 'share' : true |
| 48 | + 'share' : true, |
| 49 | + |
| 50 | + // Player library link |
| 51 | + 'aboutPlayerLibrary': true |
48 | 52 | }, |
49 | 53 | |
50 | 54 | // Flag to store the current fullscreen mode |
— | — | @@ -161,9 +165,9 @@ |
162 | 166 | if( embedPlayer.isTimedTextSupported() ){ |
163 | 167 | this.supportedComponets['timedText'] = true; |
164 | 168 | } |
165 | | - // Check for kalturaAttribution |
166 | | - if( mw.getConfig( 'EmbedPlayer.KalturaAttribution' ) ){ |
167 | | - this.supportedComponets[ 'kalturaAttribution' ] = true; |
| 169 | + // Check for Attribution button |
| 170 | + if( mw.getConfig( 'EmbedPlayer.AttributionButton' ) ){ |
| 171 | + this.supportedComponets[ 'attributionButton' ] = true; |
168 | 172 | } |
169 | 173 | |
170 | 174 | // Check global fullscreen enabled flag |
— | — | @@ -813,7 +817,7 @@ |
814 | 818 | ); |
815 | 819 | } |
816 | 820 | |
817 | | - // Setup play-head slider: |
| 821 | + // Setup volume slider: |
818 | 822 | var sliderConf = { |
819 | 823 | range: "min", |
820 | 824 | value: 80, |
— | — | @@ -935,6 +939,19 @@ |
936 | 940 | $j( ctrlObj.embedPlayer ).trigger( 'showShareEvent' ); |
937 | 941 | } |
938 | 942 | ) |
| 943 | + }, |
| 944 | + |
| 945 | + 'aboutPlayerLibrary' : function( ctrlObj ){ |
| 946 | + return $j.getLineItem( |
| 947 | + gM( 'mwe-embedplayer-about-library' ), |
| 948 | + 'info', |
| 949 | + function( ) { |
| 950 | + ctrlObj.displayOverlay( |
| 951 | + ctrlObj.aboutPlayerLibrary() |
| 952 | + ); |
| 953 | + $j( ctrlObj.embedPlayer ).trigger( 'aboutPlayerLibrary' ); |
| 954 | + } |
| 955 | + ) |
939 | 956 | } |
940 | 957 | }, |
941 | 958 | |
— | — | @@ -1050,7 +1067,25 @@ |
1051 | 1068 | |
1052 | 1069 | return false; // onclick action return false |
1053 | 1070 | }, |
1054 | | - |
| 1071 | + aboutPlayerLibrary: function(){ |
| 1072 | + return $j( '<div />' ) |
| 1073 | + .append( |
| 1074 | + $j( '<h3 />' ) |
| 1075 | + .text( |
| 1076 | + gM('mwe-embedplayer-about-library') |
| 1077 | + ) |
| 1078 | + , |
| 1079 | + $j( '<span />') |
| 1080 | + .append( |
| 1081 | + gM('mwe-embedplayer-about-library-desc', |
| 1082 | + $j('<a />').attr({ |
| 1083 | + 'href' : MW_EMBED_LIBRARY_PAGE, |
| 1084 | + 'target' : '_new' |
| 1085 | + }) |
| 1086 | + ) |
| 1087 | + ) |
| 1088 | + ) |
| 1089 | + }, |
1055 | 1090 | /** |
1056 | 1091 | * Get the "share" interface |
1057 | 1092 | * |
— | — | @@ -1428,15 +1463,31 @@ |
1429 | 1464 | }, |
1430 | 1465 | |
1431 | 1466 | /** |
1432 | | - * The kaltura attribution button |
| 1467 | + * The Attribution button ( by default this is kaltura-icon |
1433 | 1468 | */ |
1434 | | - 'kalturaAttribution' : { |
| 1469 | + 'attributionButton' : { |
1435 | 1470 | 'w' : 28, |
1436 | | - 'o' : function( ctrlObj ){ |
| 1471 | + 'o' : function( ctrlObj ){ |
| 1472 | + var buttonConfig = mw.getConfig( 'EmbedPlayer.AttributionButton'); |
| 1473 | + |
| 1474 | + var $icon = $j('<span />') |
| 1475 | + .addClass( 'ui-icon' ); |
| 1476 | + if( buttonConfig['class'] ){ |
| 1477 | + $icon.addClass( buttonConfig['class'] ) |
| 1478 | + } |
| 1479 | + // Check for source ( by configuration convention this is a 16x16 image |
| 1480 | + if( buttonConfig.iconurl ){ |
| 1481 | + $icon.append( |
| 1482 | + $j('<img />') |
| 1483 | + .css({'width': '16px', 'height': '16px'}) |
| 1484 | + .attr('src', buttonConfig.iconurl ) |
| 1485 | + ) |
| 1486 | + } |
| 1487 | + |
1437 | 1488 | return $j('<a />') |
1438 | 1489 | .attr({ |
1439 | | - 'href': 'http://kaltura.com', |
1440 | | - 'title' : gM( 'mwe-embedplayer-kaltura-platform-title' ), |
| 1490 | + 'href': buttonConfig.href, |
| 1491 | + 'title' : buttonConfig.title, |
1441 | 1492 | 'target' : '_new' |
1442 | 1493 | }) |
1443 | 1494 | .append( |
— | — | @@ -1447,10 +1498,9 @@ |
1448 | 1499 | 'left' : '2px' |
1449 | 1500 | }) |
1450 | 1501 | .append( |
1451 | | - $j('<span />') |
1452 | | - .addClass( 'ui-icon kaltura-icon' ) |
| 1502 | + $icon |
1453 | 1503 | ) |
1454 | | - ) |
| 1504 | + ) |
1455 | 1505 | } |
1456 | 1506 | }, |
1457 | 1507 | |
— | — | @@ -1687,3 +1737,6 @@ |
1688 | 1738 | } |
1689 | 1739 | } |
1690 | 1740 | }; |
| 1741 | + |
| 1742 | + |
| 1743 | +} )( window.mw ); |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/EmbedPlayer.i18n.php |
— | — | @@ -34,6 +34,9 @@ |
35 | 35 | 'mwe-embedplayer-download' => 'Download', |
36 | 36 | 'mwe-embedplayer-share' => 'Share', |
37 | 37 | 'mwe-embedplayer-credits' => 'Credits', |
| 38 | + 'mwe-embedplayer-about-library'=> 'About kaltura player', |
| 39 | + 'mwe-embedplayer-about-library-desc' => 'Kaltura\'s HTML5 Media Library enables you to take advantage of the html5 <video> and <audio> tags today with a consistent player interface across all major browsers. <br> <br> [$1 More about the kaltura player library].', |
| 40 | + |
38 | 41 | 'mwe-embedplayer-clip_linkback' => 'Clip source page', |
39 | 42 | 'mwe-embedplayer-choose_player' => 'Choose video player', |
40 | 43 | 'mwe-embedplayer-no-player' => 'No player available for $1', |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTimeline.js |
— | — | @@ -138,9 +138,15 @@ |
139 | 139 | ) |
140 | 140 | $clipTrackName = $j( '#' + this.getTrackNameInterfaceId( trackIndex ) ); |
141 | 141 | } |
142 | | - // xxx check for specific smilSequenceTrack updates that require TrackNameInterface update |
| 142 | + // Update the TrackNameInterface duration on every draw:: |
| 143 | + /*$clipTrackName.find('.trackDuration').text( |
| 144 | + mw.seconds2npt( |
| 145 | + this.sequencer.getSmil().getBody().getClipDuration( smilSequenceTrack ) |
| 146 | + ) |
| 147 | + )*/ |
143 | 148 | |
144 | 149 | |
| 150 | + |
145 | 151 | // Add Sequence track container if not present |
146 | 152 | var $clipTrackSet = $j( '#' + this.getTrackSetId( trackIndex )) |
147 | 153 | mw.log( "SequenceTimeline::drawSequenceTrack: id: " + $clipTrackSet.length ); |
— | — | @@ -776,7 +782,15 @@ |
777 | 783 | $trackNameTitle.find('span').attr('title', $j( smilSequenceTrack ).attr('title') ); |
778 | 784 | } |
779 | 785 | |
780 | | - $trackNameContainer.append( $trackNameTitle ) |
| 786 | + $trackNameContainer.append( |
| 787 | + $trackNameTitle |
| 788 | + , |
| 789 | + // Also append a trackDuration span |
| 790 | + $j( '<br />') |
| 791 | + , |
| 792 | + $j( '<span />').addClass('trackDuration') |
| 793 | + |
| 794 | + ) |
781 | 795 | // Wrap the track name in a box that matches the trackNames |
782 | 796 | return $trackNameContainer; |
783 | 797 | }, |