Property changes on: branches/querypage-work2/extensions/CategoryTree/CategoryTreeFunctions.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1 | 1 | Merged /trunk/extensions/CategoryTree/CategoryTreeFunctions.php:r74986,74989,74991-74994,74998 |
Index: branches/querypage-work2/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Ask.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | * @param Parser $parser |
25 | 25 | */ |
26 | 26 | public static function render( Parser &$parser ) { |
27 | | - global $smwgQEnabled, $smwgIQRunningNumber; |
| 27 | + global $smwgQEnabled, $smwgIQRunningNumber, $wgTitle; |
28 | 28 | |
29 | 29 | if ( $smwgQEnabled ) { |
30 | 30 | $smwgIQRunningNumber++; |
— | — | @@ -37,7 +37,13 @@ |
38 | 38 | $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) ); |
39 | 39 | } |
40 | 40 | |
41 | | - SMWOutputs::commitToParser( $parser ); |
| 41 | + if ( $wgTitle->isSpecialPage() ) { |
| 42 | + global $wgOut; |
| 43 | + SMWOutputs::commitToOutputPage( $wgOut ); |
| 44 | + } |
| 45 | + else { |
| 46 | + SMWOutputs::commitToParser( $parser ); |
| 47 | + } |
42 | 48 | |
43 | 49 | return $result; |
44 | 50 | } |
Property changes on: branches/querypage-work2/extensions/StringFunctionsEscaped |
___________________________________________________________________ |
Modified: svn:mergeinfo |
45 | 51 | Merged /trunk/extensions/StringFunctionsEscaped:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/StrategyWiki/ActiveStrategy |
___________________________________________________________________ |
Modified: svn:mergeinfo |
46 | 52 | Merged /trunk/extensions/StrategyWiki/ActiveStrategy:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/StrategyWiki |
___________________________________________________________________ |
Modified: svn:mergeinfo |
47 | 53 | Merged /trunk/extensions/StrategyWiki:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/TrustedXFF/trusted-hosts.txt |
___________________________________________________________________ |
Modified: svn:mergeinfo |
48 | 54 | Merged /trunk/extensions/TrustedXFF/trusted-hosts.txt:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/TrustedXFF |
___________________________________________________________________ |
Modified: svn:mergeinfo |
49 | 55 | Merged /trunk/extensions/TrustedXFF:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/SVGZoom |
___________________________________________________________________ |
Modified: svn:mergeinfo |
50 | 56 | Merged /trunk/extensions/SVGZoom:r74986,74989,74991-74994,74998 |
Index: branches/querypage-work2/extensions/SemanticMaps/RELEASE-NOTES |
— | — | @@ -18,6 +18,10 @@ |
19 | 19 | |
20 | 20 | * Support for images without namespace prefix in the statispoints parameter in map ask queries. |
21 | 21 | |
| 22 | +* Fixed several issue with the OpenLayers form input. |
| 23 | + |
| 24 | +* Fixed fatal error for Google Maps v2 options on Special:Ask. |
| 25 | + |
22 | 26 | === Semantic Maps 0.7 === |
23 | 27 | (2010-10-15) |
24 | 28 | |
Index: branches/querypage-work2/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php |
— | — | @@ -221,8 +221,8 @@ |
222 | 222 | // var_dump($args);exit; |
223 | 223 | } |
224 | 224 | else { |
225 | | - $this->coordinateSet['lat'] = $args[0]; |
226 | | - $this->coordinateSet['lon'] = $args[1]; |
| 225 | + $this->coordinateSet['lat'] = (float)$args[0]; |
| 226 | + $this->coordinateSet['lon'] = (float)$args[1]; |
227 | 227 | } |
228 | 228 | |
229 | 229 | $this->m_caption = MapsCoordinateParser::formatCoordinates( |
Index: branches/querypage-work2/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php |
— | — | @@ -255,6 +255,11 @@ |
256 | 256 | } |
257 | 257 | } |
258 | 258 | |
| 259 | + /** |
| 260 | + * Adds the static locations (specified via the staticlocations parameter) to the map. |
| 261 | + * |
| 262 | + * @since 0.7 |
| 263 | + */ |
259 | 264 | protected function addStaticLocations() { |
260 | 265 | global $wgTitle; |
261 | 266 | |
Index: branches/querypage-work2/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersQP.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | ), |
35 | 35 | wfMsg( 'maps-loading-map' ) |
36 | 36 | ); |
37 | | - |
| 37 | + |
38 | 38 | $this->service->addLayerDependencies( $this->layers[1] ); |
39 | 39 | |
40 | 40 | $langCode = $wgLang->getCode(); |
Index: branches/querypage-work2/extensions/SemanticMaps/includes/services/OpenLayers/SM_OpenLayersFormInput.php |
— | — | @@ -1,21 +1,9 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * File holding the SMOpenLayersFormInput class. |
6 | | - * |
7 | | - * @file SM_OpenLayersFormInput.php |
8 | | - * @ingroup SMOpenLayers |
9 | | - * |
10 | | - * @author Jeroen De Dauw |
11 | | - */ |
12 | | - |
13 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
14 | | - die( 'Not an entry point.' ); |
15 | | -} |
16 | | - |
17 | | -/** |
18 | 5 | * Class for OpenLayers form inputs. |
19 | 6 | * |
| 7 | + * @file SM_OpenLayersFormInput.php |
20 | 8 | * @ingroup SMOpenLayers |
21 | 9 | * |
22 | 10 | * @author Jeroen De Dauw |
Property changes on: branches/querypage-work2/extensions/ConditionalShowSection |
___________________________________________________________________ |
Modified: svn:mergeinfo |
23 | 11 | Merged /trunk/extensions/ConditionalShowSection:r74986,74989,74991-74994,74998 |
Index: branches/querypage-work2/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -113,7 +113,8 @@ |
114 | 114 | if ( $wgRequest->getText( '_cache_', false ) ) { |
115 | 115 | $cache = true; |
116 | 116 | $token = ''; |
117 | | - $token_match = false; |
| 117 | + $token_match = false; |
| 118 | + $wgOut->mSquidMaxage = 6000; |
118 | 119 | } else { |
119 | 120 | $cache = false; |
120 | 121 | |
— | — | @@ -1187,4 +1188,4 @@ |
1188 | 1189 | // Automatically post the form if the user has Javascript support |
1189 | 1190 | $wgOut->addHTML( '<script type="text/javascript">document.paypalredirect.submit();</script>' ); |
1190 | 1191 | } |
1191 | | -} // end class |
\ No newline at end of file |
| 1192 | +} // end class |
Property changes on: branches/querypage-work2/extensions/LocalisationUpdate |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1192 | 1193 | Merged /trunk/extensions/LocalisationUpdate:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/HoneypotIntegration/HoneypotIntegration.class.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1193 | 1194 | Merged /trunk/extensions/HoneypotIntegration/HoneypotIntegration.class.php:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/AddMediaWizard/AddMedia/AddMedia.i18n.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1194 | 1195 | Merged /trunk/extensions/AddMediaWizard/AddMedia/AddMedia.i18n.php:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/AddMediaWizard/AddMedia/mw.UploadHandler.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1195 | 1196 | Merged /trunk/extensions/AddMediaWizard/AddMedia/mw.UploadHandler.js:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/FundraiserPortal |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1196 | 1197 | Merged /trunk/extensions/FundraiserPortal:r74986,74989,74991-74994,74998 |
Index: branches/querypage-work2/extensions/Maps/includes/Maps_Layer.php |
— | — | @@ -184,6 +184,8 @@ |
185 | 185 | * Returns a string containing the JavaScript definition of this layer. |
186 | 186 | * Only call this function when you are sure the layer is valid! |
187 | 187 | * |
| 188 | + * TODO: move this to the OpenLayers class |
| 189 | + * |
188 | 190 | * @since 0.7.1 |
189 | 191 | * |
190 | 192 | * @return string |
— | — | @@ -195,7 +197,7 @@ |
196 | 198 | |
197 | 199 | $class = self::$types[$this->getType()]['class']; |
198 | 200 | |
199 | | - $options = array(); |
| 201 | + $options = array( 'isImage' => true ); |
200 | 202 | |
201 | 203 | if ( $this->properties !== false ) { |
202 | 204 | $options['numZoomLevels'] = $zoomlevels; |
Index: branches/querypage-work2/extensions/Maps/includes/services/OpenLayers/OpenLayerFunctions.js |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | * |
8 | 8 | * @author Jeroen De Dauw |
9 | 9 | */ |
10 | | - |
| 10 | + |
11 | 11 | /** |
12 | 12 | * Creates and initializes an OpenLayers map. |
13 | 13 | * The resulting map is returned by the function but no further handling is required in most cases. |
— | — | @@ -15,16 +15,28 @@ |
16 | 16 | |
17 | 17 | OpenLayers.Lang.setCode( langCode ); |
18 | 18 | |
| 19 | + var hasImageLayer = false; |
| 20 | + for ( i = 0, n = mapTypes.length; i < n; i++ ) { |
| 21 | + // Idieally this would check if the objecct is of type OpenLayers.layer.image |
| 22 | + if ( mapTypes[i].options && mapTypes[i].options.isImage === true ) { |
| 23 | + hasImageLayer = true; |
| 24 | + break; |
| 25 | + } |
| 26 | + } |
| 27 | + |
19 | 28 | // Create a new OpenLayers map with without any controls on it. |
20 | | - var mapOptions = { |
21 | | - projection: new OpenLayers.Projection("EPSG:900913"), |
22 | | - displayProjection: new OpenLayers.Projection("EPSG:4326"), |
23 | | - units: "m", |
24 | | - numZoomLevels: 18, |
25 | | - maxResolution: 156543.0339, |
26 | | - maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34), |
| 29 | + var mapOptions = { |
27 | 30 | controls: [] |
28 | 31 | }; |
| 32 | + |
| 33 | + if ( !hasImageLayer ) { |
| 34 | + mapOptions.projection = new OpenLayers.Projection("EPSG:900913"); |
| 35 | + mapOptions.displayProjection = new OpenLayers.Projection("EPSG:4326"); |
| 36 | + mapOptions.units = "m"; |
| 37 | + mapOptions.numZoomLevels = 18; |
| 38 | + mapOptions.maxResolution = 156543.0339; |
| 39 | + mapOptions.maxExtent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34); |
| 40 | + } |
29 | 41 | |
30 | 42 | var mapElement = document.getElementById( mapName ); |
31 | 43 | |
— | — | @@ -73,7 +85,11 @@ |
74 | 86 | |
75 | 87 | for ( i = marker_data.length - 1; i >= 0; i-- ) { |
76 | 88 | marker_data[i].lonlat = new OpenLayers.LonLat( marker_data[i].lon, marker_data[i].lat ); |
77 | | - marker_data[i].lonlat.transform( new OpenLayers.Projection( "EPSG:4326" ), new OpenLayers.Projection( "EPSG:900913" ) ); |
| 89 | + |
| 90 | + if ( !hasImageLayer ) { |
| 91 | + marker_data[i].lonlat.transform( new OpenLayers.Projection( "EPSG:4326" ), new OpenLayers.Projection( "EPSG:900913" ) ); |
| 92 | + } |
| 93 | + |
78 | 94 | if ( bounds != null ) bounds.extend( marker_data[i].lonlat ); // Extend the bounds when no center is set. |
79 | 95 | markerLayer.addMarker( getOLMarker( markerLayer, marker_data[i], map.getProjectionObject() ) ); // Create and add the marker. |
80 | 96 | } |
— | — | @@ -82,7 +98,11 @@ |
83 | 99 | |
84 | 100 | if (centerIsSet) { // When the center is provided, set it. |
85 | 101 | var centre = new OpenLayers.LonLat(lon, lat); |
86 | | - centre.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")); |
| 102 | + |
| 103 | + if ( !hasImageLayer ) { |
| 104 | + centre.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")); |
| 105 | + } |
| 106 | + |
87 | 107 | map.setCenter(centre); |
88 | 108 | } |
89 | 109 | |
Index: branches/querypage-work2/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | $defaultGroup = wfMsg( 'maps-markers' ); |
89 | 89 | //.// TODO |
90 | 90 | foreach ( $markers as $marker ) { |
91 | | - $markerItems[false ? $marker[5] : $defaultGroup] = MapsMapper::encodeJsVar( (object)array( |
| 91 | + $markerItems[] = MapsMapper::encodeJsVar( (object)array( |
92 | 92 | 'lat' => $marker[0], |
93 | 93 | 'lon' => $marker[1], |
94 | 94 | 'title' => $marker[2], |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandlerHooks.php |
— | — | @@ -1,13 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -/** |
5 | | - * Hooks for TimedMediaHandler extension |
6 | | - * |
7 | | - * @file |
8 | | - * @ingroup Extensions |
9 | | - */ |
10 | | - |
11 | | -class TimedMediaHandlerHooks { |
12 | | - |
13 | | - |
14 | | -} |
\ No newline at end of file |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandler.php |
— | — | @@ -28,12 +28,18 @@ |
29 | 29 | $wgExtensionMessagesFiles['TimedMediaHandlerMagic'] = "$timedMediaDir/TimedMediaHandler.i18n.magic.php"; |
30 | 30 | $wgParserOutputHooks['TimedMediaHandler'] = array( 'TimedMediaHandler', 'outputHook' ); |
31 | 31 | |
| 32 | +// Load all the mwEmbed modules: |
| 33 | +MwEmbedResourceManager::registerModulePath( 'extensions/TimedMediaHandler/EmbedPlayer' ); |
| 34 | +MwEmbedResourceManager::registerModulePath( 'extensions/TimedMediaHandler/TimedText' ); |
32 | 35 | |
| 36 | + |
33 | 37 | // Setup a hook for iframe=true (will strip the interface and only output the player) |
34 | 38 | $wgHooks['ArticleFromTitle'][] = 'TimedMediaHandler::iframeOutputHook'; |
35 | 39 | |
36 | | -// OggTranscode setup |
| 40 | +// AutoLoad Classes: |
37 | 41 | $wgAutoloadClasses['WebVideoTranscode'] = "$timedMediaDir/WebVideoTranscode/WebVideoTranscode.php"; |
| 42 | +$wgAutoloadClasses['TimedMediaHandlerHooks'] = "$timedMediaDir/TimedMediaHandler.hooks.php"; |
| 43 | + |
38 | 44 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'WebVideoTranscode::schema'; |
39 | 45 | |
40 | 46 | $wgExtensionCredits['media'][] = array( |
— | — | @@ -44,9 +50,8 @@ |
45 | 51 | 'descriptionmsg' => 'timedmedia-desc', |
46 | 52 | ); |
47 | 53 | |
48 | | -// Include javascript resource registration: |
49 | | -include( "$timedMediaDir/TimedMediaHandler.modules.hooks.php" ); |
50 | 54 | |
| 55 | + |
51 | 56 | /******************* CONFIGURATION STARTS HERE **********************/ |
52 | 57 | |
53 | 58 | // Set the supported ogg codecs: |
— | — | @@ -73,7 +78,7 @@ |
74 | 79 | // The location of ffmpeg2theora ( for metadata and transcoding ) |
75 | 80 | $wgffmpeg2theoraPath = '/usr/bin/ffmpeg2theora'; |
76 | 81 | |
77 | | -// Location of the FFmpeg binary |
| 82 | +// Location of the FFmpeg binary ( used to encode WebM and for thumbnails ) |
78 | 83 | $wgFFmpegLocation = '/usr/bin/ffmpeg'; |
79 | 84 | |
80 | 85 | |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/TimedText.resourceList.php |
— | — | @@ -0,0 +1,16 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * EmbedPlayer module resource list array |
| 6 | + */ |
| 7 | + |
| 8 | +return array( |
| 9 | + // Top level TimedText name: |
| 10 | + "mw.TimedText" => array( "scripts" => "mw.TimedText.js" ), |
| 11 | + "mw.style.TimedText" => array( "scripts" => "css/mw.style.TimedText.css"), |
| 12 | + |
| 13 | + "mw.TimedTextEdit" => array( "scripts" => "mw.TimedTextEdit.js"), |
| 14 | + "mw.style.TimedTextEdit" => array( "scripts" => "css/mw.style.TimedTextEdit.css"), |
| 15 | + |
| 16 | + "RemoteMwTimedText" => array( "scripts" => "remotes/RemoteMwTimedText.js") |
| 17 | +); |
\ No newline at end of file |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/loader.js |
— | — | @@ -2,18 +2,8 @@ |
3 | 3 | * TimedText loader. |
4 | 4 | */ |
5 | 5 | // Scope everything in "mw" ( keeps the global namespace clean ) |
6 | | -( function( mw ) { |
| 6 | +( function( mw ) { |
7 | 7 | |
8 | | - mw.addResourcePaths( { |
9 | | - "mw.TimedText" : "mw.TimedText.js", |
10 | | - "mw.style.TimedText" : "css/mw.style.TimedText.css", |
11 | | - |
12 | | - "mw.TimedTextEdit" : "mw.TimedTextEdit.js", |
13 | | - "mw.style.TimedTextEdit" : "css/mw.style.TimedTextEdit.css", |
14 | | - |
15 | | - "RemoteMwTimedText" : "remotes/RemoteMwTimedText.js" |
16 | | - } ); |
17 | | - |
18 | 8 | mw.setDefaultConfig( { |
19 | 9 | // If the Timed Text interface should be displayed: |
20 | 10 | // 'always' Displays link and call to contribute always |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/mw.TimedText.js |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | 'targetMenuContainer' : _this.menuTarget, |
204 | 204 | 'positionOpts' : positionOpts, |
205 | 205 | 'backLinkText' : gM( 'mwe-timedtext-back-btn' ) |
206 | | - } ) |
| 206 | + } ); |
207 | 207 | }); |
208 | 208 | }, |
209 | 209 | |
— | — | @@ -429,10 +429,7 @@ |
430 | 430 | // Layout Menu option |
431 | 431 | $j.getLineItem( gM( 'mwe-timedtext-layout' ), 'image' ).append( |
432 | 432 | _this.getLayoutMenu() |
433 | | - ) |
434 | | - |
435 | | - // Search Menu option |
436 | | - //$j.getLineItem( gM('mwe-timedtext-search'), 'search') |
| 433 | + ) |
437 | 434 | ); |
438 | 435 | } |
439 | 436 | // Put in the "Make Transcript" link if config enabled and we have an api key |
— | — | @@ -442,7 +439,8 @@ |
443 | 440 | ); |
444 | 441 | } |
445 | 442 | |
446 | | - |
| 443 | + $j( _this.embedPlayer ).trigger( 'TimedText.BuildCCMenu', $menu ) ; |
| 444 | + |
447 | 445 | return $menu; |
448 | 446 | }, |
449 | 447 | |
— | — | @@ -466,6 +464,10 @@ |
467 | 465 | }); |
468 | 466 | }, |
469 | 467 | |
| 468 | + showMiroSubs: function(){ |
| 469 | + |
| 470 | + }, |
| 471 | + |
470 | 472 | /** |
471 | 473 | * Utility function to assist in menu build out: |
472 | 474 | * Get menu line item (li) html: <li><a> msgKey </a></li> |
— | — | @@ -478,9 +480,9 @@ |
479 | 481 | */ |
480 | 482 | getLiAddText: function() { |
481 | 483 | var _this = this; |
482 | | - return $j.getLineItem( gM( 'mwe-timedtext-add-timed-text'), 'script', function() { |
483 | | - _this.showTimedTextEditUI( 'add' ); |
484 | | - } ); |
| 484 | + return $j.getLineItem( gM( 'mwe-timedtext-upload-timed-text'), 'script', function() { |
| 485 | + _this.showTimedTextEditUI( 'add' ); |
| 486 | + } ); |
485 | 487 | }, |
486 | 488 | |
487 | 489 | /** |
— | — | @@ -651,12 +653,12 @@ |
652 | 654 | // Init Category menu item if it does not already exist: |
653 | 655 | if( !catSourceList[ catKey ] ) { |
654 | 656 | // Set up catList pointer: |
655 | | - catSourceList[ catKey ] = [ ] |
| 657 | + catSourceList[ catKey ] = [ ]; |
656 | 658 | } |
657 | 659 | // Append to the source category key menu item: |
658 | 660 | catSourceList[ catKey ].push( |
659 | 661 | _this.getLiSource( source ) |
660 | | - ) |
| 662 | + ); |
661 | 663 | }else{ |
662 | 664 | sourcesWithoutCategory.push( _this.getLiSource( source ) ); |
663 | 665 | } |
— | — | @@ -669,7 +671,7 @@ |
670 | 672 | for(var i in catSourceList[ catKey ]) { |
671 | 673 | $catChildren.append( |
672 | 674 | catSourceList[ catKey ][i] |
673 | | - ) |
| 675 | + ); |
674 | 676 | } |
675 | 677 | // Append a cat menu item for each category list |
676 | 678 | $langMenu.append( |
— | — | @@ -683,7 +685,7 @@ |
684 | 686 | for(var i in catSourceList[ catKey ]) { |
685 | 687 | $langMenu.append( |
686 | 688 | catSourceList[ catKey ][i] |
687 | | - ) |
| 689 | + ); |
688 | 690 | } |
689 | 691 | } |
690 | 692 | } |
— | — | @@ -696,7 +698,7 @@ |
697 | 699 | $langMenu.append( |
698 | 700 | _this.getLiAddText() |
699 | 701 | ); |
700 | | - |
| 702 | + |
701 | 703 | return $langMenu; |
702 | 704 | }, |
703 | 705 | |
— | — | @@ -745,7 +747,7 @@ |
746 | 748 | * Add an track div to the embedPlayer |
747 | 749 | */ |
748 | 750 | addItextDiv: function( category ) { |
749 | | - mw.log(" addItextDiv: " + category ) |
| 751 | + mw.log(" addItextDiv: " + category ); |
750 | 752 | // Get the relative positioned player class from the controlBuilder: |
751 | 753 | var $playerTarget = this.embedPlayer.$interface; |
752 | 754 | |
— | — | @@ -767,7 +769,7 @@ |
768 | 770 | }) |
769 | 771 | .append( |
770 | 772 | $j('<span \>') |
771 | | - ) |
| 773 | + ); |
772 | 774 | |
773 | 775 | // Scale the text Relative to player size: |
774 | 776 | $track.css( |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/mw.TimedTextEdit.js |
— | — | @@ -39,7 +39,8 @@ |
40 | 40 | textEditStages:{ |
41 | 41 | 'upload':{ |
42 | 42 | 'icon' : 'folder-open' |
43 | | - }, |
| 43 | + } |
| 44 | + /* |
44 | 45 | 'transcribe':{ |
45 | 46 | 'icon' : 'comment' |
46 | 47 | }, |
— | — | @@ -49,6 +50,7 @@ |
50 | 51 | 'translate':{ |
51 | 52 | 'icon' : 'flag' |
52 | 53 | } |
| 54 | + */ |
53 | 55 | }, |
54 | 56 | |
55 | 57 | /** |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedText/TimedText.i18n.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | 'mwe-timedtext-upload-text-done-uploading' => 'Done uploading', |
34 | 34 | 'mwe-timedtext-back-btn' => 'Back', |
35 | 35 | 'mwe-timedtext-choose-text' => 'Choose text', |
36 | | - 'mwe-timedtext-add-timed-text' => 'Add timed text', |
| 36 | + 'mwe-timedtext-upload-timed-text' => 'Upload subtitles', |
37 | 37 | 'mwe-timedtext-loading-text-edit' => 'Loading timed text editor', |
38 | 38 | 'mwe-timedtext-search' => 'Search clip', |
39 | 39 | 'mwe-timedtext-layout' => 'Layout', |
Index: branches/querypage-work2/extensions/TimedMediaHandler/TimedMediaHandler.hooks.php |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Hooks for TimedMediaHandler extension |
| 6 | + * |
| 7 | + * @file |
| 8 | + * @ingroup Extensions |
| 9 | + */ |
| 10 | + |
| 11 | +class TimedMediaHandlerHooks { |
| 12 | + |
| 13 | +} |
\ No newline at end of file |
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/loader.js |
— | — | @@ -1,251 +0,0 @@ |
2 | | -/** |
3 | | -* EmbedPlayer loader |
4 | | -*/ |
5 | | - |
6 | | -/** |
7 | | -* Default player module configuration |
8 | | -*/ |
9 | | -( function( mw ) { |
10 | | - |
11 | | - mw.setDefaultConfig( { |
12 | | - // If the player controls should be overlaid on top of the video ( if supported by playback method) |
13 | | - // can be set to false per embed player via overlayControls attribute |
14 | | - 'EmbedPlayer.OverlayControls' : true, |
15 | | - |
16 | | - 'EmbedPlayer.LibraryPage': 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library', |
17 | | - |
18 | | - // A default apiProvider ( ie where to lookup subtitles, video properties etc ) |
19 | | - // NOTE: Each player instance can also specify a specific provider |
20 | | - "EmbedPlayer.ApiProvider" : "local", |
21 | | - |
22 | | - // What tags will be re-written to video player by default |
23 | | - // Set to empty string or null to avoid automatic video tag rewrites to embedPlayer |
24 | | - "EmbedPlayer.RewriteTags" : "video,audio,playlist", |
25 | | - |
26 | | - // Default video size ( if no size provided ) |
27 | | - "EmbedPlayer.DefaultSize" : "400x300", |
28 | | - |
29 | | - // If the video player should attribute kaltura |
30 | | - "EmbedPlayer.KalturaAttribution" : true, |
31 | | - |
32 | | - // The attribution button |
33 | | - 'EmbedPlayer.AttributionButton' :{ |
34 | | - 'title' : 'Kaltura html5 video library', |
35 | | - 'href' : 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library', |
36 | | - // Style icon to be applied |
37 | | - 'class' : 'kaltura-icon', |
38 | | - // An icon image url ( should be a 12x12 image or data url ) |
39 | | - 'iconurl' : false |
40 | | - }, |
41 | | - |
42 | | - |
43 | | - // Set the browser player warning flag displays warning for non optimal playback |
44 | | - "EmbedPlayer.ShowNativeWarning" : true, |
45 | | - |
46 | | - // If fullscreen is global enabled. |
47 | | - "EmbedPlayer.EnableFullscreen" : true, |
48 | | - |
49 | | - // If mwEmbed should use the Native player controls |
50 | | - // this will prevent video tag rewriting and skinning |
51 | | - // useful for devices such as iPad / iPod that |
52 | | - // don't fully support DOM overlays or don't expose full-screen |
53 | | - // functionality to javascript |
54 | | - "EmbedPlayer.NativeControls" : false, |
55 | | - |
56 | | - // If mwEmbed should use native controls on mobile safari |
57 | | - "EmbedPlayer.NativeControlsMobileSafari" : true, |
58 | | - |
59 | | - |
60 | | - // The z-index given to the player interface during full screen ( high z-index ) |
61 | | - "EmbedPlayer.fullScreenZIndex" : 999998, |
62 | | - |
63 | | - // The default share embed mode ( can be "object" or "videojs" ) |
64 | | - // |
65 | | - // "object" will provide a <object tag pointing to mwEmbedFrame.php |
66 | | - // Object embedding should be much more compatible with sites that |
67 | | - // let users embed flash applets |
68 | | - // "videojs" will include the source javascript and video tag to |
69 | | - // rewrite the player on the remote page DOM |
70 | | - // Video tag embedding is much more mash-up friendly but exposes |
71 | | - // the remote site to the mwEmbed javascript and can be a xss issue. |
72 | | - "EmbedPlayer.ShareEmbedMode" : 'object', |
73 | | - |
74 | | - // Default player skin name |
75 | | - "EmbedPlayer.SkinName" : "mvpcf", |
76 | | - |
77 | | - // Number of milliseconds between interface updates |
78 | | - 'EmbedPlayer.MonitorRate' : 250 |
79 | | - } ); |
80 | | - |
81 | | - // Add class file paths |
82 | | - mw.addResourcePaths( { |
83 | | - "mw.EmbedPlayer" : "mw.EmbedPlayer.js", |
84 | | - |
85 | | - "mw.EmbedPlayerKplayer" : "mw.EmbedPlayerKplayer.js", |
86 | | - "mw.EmbedPlayerGeneric" : "mw.EmbedPlayerGeneric.js", |
87 | | - "mw.EmbedPlayerHtml" : "mw.EmbedPlayerHtml.js", |
88 | | - "mw.EmbedPlayerJava": "mw.EmbedPlayerJava.js", |
89 | | - "mw.EmbedPlayerNative" : "mw.EmbedPlayerNative.js", |
90 | | - |
91 | | - "mw.EmbedPlayerVlc" : "mw.EmbedPlayerVlc.js", |
92 | | - |
93 | | - "mw.PlayerControlBuilder" : "skins/mw.PlayerControlBuilder.js", |
94 | | - |
95 | | - "mw.style.EmbedPlayer" : "skins/mw.style.EmbedPlayer.css", |
96 | | - |
97 | | - "mw.style.PlayerSkinKskin" : "skins/kskin/mw.style.PlayerSkinKskin.css", |
98 | | - |
99 | | - "mw.PlayerSkinKskin" : "skins/kskin/mw.PlayerSkinKskin.js", |
100 | | - |
101 | | - "mw.PlayerSkinMvpcf" : "skins/mvpcf/mw.PlayerSkinMvpcf.js", |
102 | | - "mw.style.PlayerSkinMvpcf" : "skins/mvpcf/mw.style.PlayerSkinMvpcf.css" |
103 | | - } ); |
104 | | - |
105 | | - /** |
106 | | - * Check the current DOM for any tags in "EmbedPlayer.RewriteTags" |
107 | | - */ |
108 | | - mw.documentHasPlayerTags = function() { |
109 | | - var rewriteTags = mw.getConfig( 'EmbedPlayer.RewriteTags' ); |
110 | | - if( $j( rewriteTags ).length != 0 ) { |
111 | | - return true; |
112 | | - } |
113 | | - |
114 | | - var tagCheckObject = { 'hasTags' : false }; |
115 | | - $j( mw ).trigger( 'LoaderEmbedPlayerDocumentHasPlayerTags', |
116 | | - [ tagCheckObject ]); |
117 | | - |
118 | | - return tagCheckObject.hasTags; |
119 | | - }; |
120 | | - |
121 | | - /** |
122 | | - * Add a DOM ready check for player tags |
123 | | - * |
124 | | - * We use mw.addSetupHook instead of mw.ready so that |
125 | | - * mwEmbed player is setup before any other mw.ready calls |
126 | | - */ |
127 | | - mw.addSetupHook( function( callback ) { |
128 | | - mw.rewritePagePlayerTags(); |
129 | | - // Run the setupFlag to continue setup |
130 | | - callback(); |
131 | | - }); |
132 | | - |
133 | | - mw.rewritePagePlayerTags = function() { |
134 | | - mw.log( 'EmbedPlayer:: Document::' + mw.documentHasPlayerTags() ); |
135 | | - if( mw.documentHasPlayerTags() ) { |
136 | | - var rewriteElementCount = 0; |
137 | | - |
138 | | - // Set each player to loading ( as early on as possible ) |
139 | | - $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function( index, element ){ |
140 | | - |
141 | | - // Assign an the element an ID ( if its missing one ) |
142 | | - if ( $j( element ).attr( "id" ) == '' ) { |
143 | | - $j( element ).attr( "id", 'v' + ( rewriteElementCount++ ) ); |
144 | | - } |
145 | | - // Add an absolute positioned loader |
146 | | - $j( element ) |
147 | | - .getAbsoluteOverlaySpinner() |
148 | | - .attr('id', 'loadingSpinner_' + $j( element ).attr('id') ) |
149 | | - .addClass( 'playerLoadingSpinner' ); |
150 | | - |
151 | | - }); |
152 | | - // Load the embedPlayer module ( then run queued hooks ) |
153 | | - mw.load( 'EmbedPlayer', function ( ) { |
154 | | - mw.log("EmbedPlayer:: do rewrite players:" + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).length ); |
155 | | - // Rewrite the EmbedPlayer.RewriteTags with the |
156 | | - $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).embedPlayer(); |
157 | | - }) |
158 | | - } |
159 | | - } |
160 | | - |
161 | | - /** |
162 | | - * Add the module loader function: |
163 | | - */ |
164 | | - mw.addModuleLoader( 'EmbedPlayer', function() { |
165 | | - var _this = this; |
166 | | - // Hide videonojs class |
167 | | - $j( '.videonojs' ).hide(); |
168 | | - |
169 | | - // Set up the embed video player class request: (include the skin js as well) |
170 | | - var dependencyRequest = [ |
171 | | - [ |
172 | | - 'mw.EmbedPlayer' |
173 | | - ], |
174 | | - [ |
175 | | - 'mw.PlayerControlBuilder', |
176 | | - '$j.fn.hoverIntent', |
177 | | - 'mw.style.EmbedPlayer', |
178 | | - '$j.cookie', |
179 | | - // Add JSON lib if browsers does not define "JSON" natively |
180 | | - 'JSON', |
181 | | - '$j.ui', |
182 | | - '$j.widget' |
183 | | - ], |
184 | | - [ |
185 | | - '$j.ui.mouse', |
186 | | - '$j.fn.menu', |
187 | | - 'mw.style.jquerymenu', |
188 | | - '$j.ui.slider' |
189 | | - ] |
190 | | - |
191 | | - ]; |
192 | | - |
193 | | - // Pass every tag being rewritten through the update request function |
194 | | - $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function() { |
195 | | - var playerElement = this; |
196 | | - mw.embedPlayerUpdateLibraryRequest( playerElement, dependencyRequest[ 1 ] ) |
197 | | - } ); |
198 | | - |
199 | | - // Add PNG fix code needed: |
200 | | - if ( $j.browser.msie && $j.browser.version < 7 ) { |
201 | | - dependencyRequest[0].push( '$j.fn.pngFix' ); |
202 | | - } |
203 | | - |
204 | | - // Do short detection, to avoid extra player library request in ~most~ cases. |
205 | | - //( If browser is firefox include native, if browser is IE include java ) |
206 | | - if( $j.browser.msie ) { |
207 | | - dependencyRequest[0].push( 'mw.EmbedPlayerJava' ) |
208 | | - } |
209 | | - |
210 | | - // Safari gets slower load since we have to detect ogg support |
211 | | - if( !!document.createElement('video').canPlayType && !$j.browser.safari ) { |
212 | | - dependencyRequest[0].push( 'mw.EmbedPlayerNative' ) |
213 | | - } |
214 | | - |
215 | | - // Return the set of libs to be loaded |
216 | | - return dependencyRequest; |
217 | | - } ); |
218 | | - |
219 | | - /** |
220 | | - * Takes a embed player element and updates a request object with any |
221 | | - * dependent libraries per that tags attributes. |
222 | | - * |
223 | | - * For example a player skin class name could result in adding some |
224 | | - * css and javascirpt to the player library request. |
225 | | - * |
226 | | - * @param {Object} playerElement The tag to check for library dependent request classes. |
227 | | - * @param {Array} dependencyRequest The library request array |
228 | | - */ |
229 | | - mw.embedPlayerUpdateLibraryRequest = function(playerElement, dependencyRequest ){ |
230 | | - var skinName = $j( playerElement ).attr( 'class' ); |
231 | | - // Set playerClassName to default if unset or not a valid skin |
232 | | - if( ! skinName || $j.inArray( skinName.toLowerCase(), mw.validSkins ) == -1 ){ |
233 | | - skinName = mw.getConfig( 'EmbedPlayer.SkinName' ); |
234 | | - } |
235 | | - skinName = skinName.toLowerCase(); |
236 | | - // Add the skin to the request |
237 | | - var skinCaseName = skinName.charAt(0).toUpperCase() + skinName.substr(1); |
238 | | - // The skin js: |
239 | | - if( $j.inArray( 'mw.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){ |
240 | | - dependencyRequest.push( 'mw.PlayerSkin' + skinCaseName ); |
241 | | - } |
242 | | - // The skin css |
243 | | - if( $j.inArray( 'mw.style.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){ |
244 | | - dependencyRequest.push( 'mw.style.PlayerSkin' + skinCaseName ); |
245 | | - } |
246 | | - |
247 | | - // Allow extension to extend the request. |
248 | | - $j( mw ).trigger( 'LoaderEmbedPlayerUpdateRequest', |
249 | | - [ playerElement, dependencyRequest ] ); |
250 | | - } |
251 | | - |
252 | | -} )( window.mw ); |
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.resourceList.php |
— | — | @@ -0,0 +1,28 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * EmbedPlayer module resource list array |
| 6 | + */ |
| 7 | + |
| 8 | +return array( |
| 9 | + "mw.EmbedPlayer" => array( 'scripts'=> "mw.EmbedPlayer.js" ), |
| 10 | + |
| 11 | + "mw.EmbedPlayerKplayer" => array( 'scripts'=> "mw.EmbedPlayerKplayer.js" ), |
| 12 | + "mw.EmbedPlayerGeneric" => array( 'scripts'=> "mw.EmbedPlayerGeneric.js" ), |
| 13 | + "mw.EmbedPlayerHtml" => array( 'scripts'=> "mw.EmbedPlayerHtml.js" ), |
| 14 | + "mw.EmbedPlayerJava" => array( 'scripts'=> "mw.EmbedPlayerJava.js"), |
| 15 | + "mw.EmbedPlayerNative" => array( 'scripts'=> "mw.EmbedPlayerNative.js" ), |
| 16 | + |
| 17 | + "mw.EmbedPlayerVlc" => array( 'scripts'=> "mw.EmbedPlayerVlc.js" ), |
| 18 | + |
| 19 | + "mw.PlayerControlBuilder" => array( 'scripts' => "skins/mw.PlayerControlBuilder.js" ), |
| 20 | + |
| 21 | + "mw.style.EmbedPlayer" => array( 'scripts'=> "skins/mw.style.EmbedPlayer.css" ), |
| 22 | + |
| 23 | + "mw.style.PlayerSkinKskin" => array( 'scripts' => "skins/kskin/mw.style.PlayerSkinKskin.css" ), |
| 24 | + |
| 25 | + "mw.PlayerSkinKskin" => array( 'scripts' => "skins/kskin/mw.PlayerSkinKskin.js"), |
| 26 | + |
| 27 | + "mw.PlayerSkinMvpcf" => array( 'scripts'=> "skins/mvpcf/mw.PlayerSkinMvpcf.js"), |
| 28 | + "mw.style.PlayerSkinMvpcf" => array( 'scripts'=> "skins/mvpcf/mw.style.PlayerSkinMvpcf.css"), |
| 29 | +); |
\ No newline at end of file |
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -7,11 +7,7 @@ |
8 | 8 | * mw.PlayerControlBuilder Handles skinning of the player controls |
9 | 9 | */ |
10 | 10 | |
11 | | -/** |
12 | | - * Add the messages text: |
13 | | - */ |
14 | | - |
15 | | -mw.includeAllModuleMessages(); |
| 11 | + |
16 | 12 | /* |
17 | 13 | * The default video attributes supported by embedPlayer |
18 | 14 | */ |
— | — | @@ -134,7 +130,71 @@ |
135 | 131 | "type" : null |
136 | 132 | }); |
137 | 133 | |
| 134 | +mw.setDefaultConfig( { |
| 135 | + // If the player controls should be overlaid on top of the video ( if supported by playback method) |
| 136 | + // can be set to false per embed player via overlayControls attribute |
| 137 | + 'EmbedPlayer.OverlayControls' : true, |
| 138 | + |
| 139 | + 'EmbedPlayer.LibraryPage': 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library', |
| 140 | + |
| 141 | + // A default apiProvider ( ie where to lookup subtitles, video properties etc ) |
| 142 | + // NOTE: Each player instance can also specify a specific provider |
| 143 | + "EmbedPlayer.ApiProvider" : "local", |
| 144 | + |
| 145 | + // Default video size ( if no size provided ) |
| 146 | + "EmbedPlayer.DefaultSize" : "400x300", |
138 | 147 | |
| 148 | + // If the video player should attribute kaltura |
| 149 | + "EmbedPlayer.KalturaAttribution" : true, |
| 150 | + |
| 151 | + // The attribution button |
| 152 | + 'EmbedPlayer.AttributionButton' :{ |
| 153 | + 'title' : 'Kaltura html5 video library', |
| 154 | + 'href' : 'http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library', |
| 155 | + // Style icon to be applied |
| 156 | + 'class' : 'kaltura-icon', |
| 157 | + // An icon image url ( should be a 12x12 image or data url ) |
| 158 | + 'iconurl' : false |
| 159 | + }, |
| 160 | + |
| 161 | + |
| 162 | + // Set the browser player warning flag displays warning for non optimal playback |
| 163 | + "EmbedPlayer.ShowNativeWarning" : true, |
| 164 | + |
| 165 | + // If fullscreen is global enabled. |
| 166 | + "EmbedPlayer.EnableFullscreen" : true, |
| 167 | + |
| 168 | + // If mwEmbed should use the Native player controls |
| 169 | + // this will prevent video tag rewriting and skinning |
| 170 | + // useful for devices such as iPad / iPod that |
| 171 | + // don't fully support DOM overlays or don't expose full-screen |
| 172 | + // functionality to javascript |
| 173 | + "EmbedPlayer.NativeControls" : false, |
| 174 | + |
| 175 | + // If mwEmbed should use native controls on mobile safari |
| 176 | + "EmbedPlayer.NativeControlsMobileSafari" : true, |
| 177 | + |
| 178 | + |
| 179 | + // The z-index given to the player interface during full screen ( high z-index ) |
| 180 | + "EmbedPlayer.fullScreenZIndex" : 999998, |
| 181 | + |
| 182 | + // The default share embed mode ( can be "object" or "videojs" ) |
| 183 | + // |
| 184 | + // "object" will provide a <object tag pointing to mwEmbedFrame.php |
| 185 | + // Object embedding should be much more compatible with sites that |
| 186 | + // let users embed flash applets |
| 187 | + // "videojs" will include the source javascript and video tag to |
| 188 | + // rewrite the player on the remote page DOM |
| 189 | + // Video tag embedding is much more mash-up friendly but exposes |
| 190 | + // the remote site to the mwEmbed javascript and can be a xss issue. |
| 191 | + "EmbedPlayer.ShareEmbedMode" : 'object', |
| 192 | + |
| 193 | + // Default player skin name |
| 194 | + "EmbedPlayer.SkinName" : "mvpcf", |
| 195 | + |
| 196 | + // Number of milliseconds between interface updates |
| 197 | + 'EmbedPlayer.MonitorRate' : 250 |
| 198 | +} |
139 | 199 | /** |
140 | 200 | * The base source attribute checks |
141 | 201 | * also see: http://dev.w3.org/html5/spec/Overview.html#the-source-element |
— | — | @@ -261,7 +321,7 @@ |
262 | 322 | 'width' : width, |
263 | 323 | 'height' : height |
264 | 324 | }) |
265 | | - ) |
| 325 | + ); |
266 | 326 | } |
267 | 327 | }); |
268 | 328 | |
— | — | @@ -302,7 +362,7 @@ |
303 | 363 | callback(); |
304 | 364 | } |
305 | 365 | |
306 | | - }) |
| 366 | + }); |
307 | 367 | }; |
308 | 368 | |
309 | 369 | } )( jQuery ); |
— | — | @@ -434,7 +494,7 @@ |
435 | 495 | |
436 | 496 | // Copy over any data attributes from the playerElement |
437 | 497 | if( mw.getConfig( 'EmbedPlayer.DataAttributes' ) ) { |
438 | | - var dataAttr = mw.getConfig( 'EmbedPlayer.DataAttributes' ) |
| 498 | + var dataAttr = mw.getConfig( 'EmbedPlayer.DataAttributes' ); |
439 | 499 | for( var i in dataAttr ){ |
440 | 500 | if( $j( playerElement ).data( i ) ){ |
441 | 501 | $j( '#' + playerInterface.id ).data( i, $j( playerElement ).data( i ) ); |
— | — | @@ -444,7 +504,7 @@ |
445 | 505 | |
446 | 506 | // Pass the id to any hook that needs to interface prior to checkPlayerSources |
447 | 507 | mw.log("EmbedPlayer::addElement :trigger " + playerInterface.id ); |
448 | | - $j( mw ).trigger ( 'newEmbedPlayerEvent', playerInterface.id ); |
| 508 | + $j( mw ).trigger ( 'newEmbedPlayerEvent', $j( '#' + playerInterface.id ).get(0) ); |
449 | 509 | |
450 | 510 | // Issue the checkPlayerSources call to the new player interface: |
451 | 511 | // make sure to use the element that is in the DOM: |
— | — | @@ -572,7 +632,7 @@ |
573 | 633 | .show() |
574 | 634 | .after( |
575 | 635 | $j( swapPlayerElement ).css( 'display', 'none' ) |
576 | | - ) |
| 636 | + ); |
577 | 637 | } else { |
578 | 638 | $j( targetElement ).replaceWith( swapPlayerElement ); |
579 | 639 | } |
— | — | @@ -589,7 +649,7 @@ |
590 | 650 | if( playerInterface.useNativePlayerControls() ) { |
591 | 651 | $j( targetElement ) |
592 | 652 | .getAbsoluteOverlaySpinner() |
593 | | - .attr('id', 'loadingSpinner_' + playerInterface.id ) |
| 653 | + .attr('id', 'loadingSpinner_' + playerInterface.id ); |
594 | 654 | }else{ |
595 | 655 | $j( swapPlayerElement ).append( |
596 | 656 | $j('<div />') |
— | — | @@ -642,7 +702,7 @@ |
643 | 703 | } |
644 | 704 | } |
645 | 705 | } |
646 | | -} |
| 706 | +}; |
647 | 707 | |
648 | 708 | /** |
649 | 709 | * mediaSource class represents a source for a media element. |
— | — | @@ -1130,7 +1190,7 @@ |
1131 | 1191 | var mimeType = playableSources[source].mimeType; |
1132 | 1192 | var player = mw.EmbedTypes.players.defaultPlayer( mimeType ); |
1133 | 1193 | if ( player && player.library == 'Native' ) { |
1134 | | - mw.log('Set native playback'); |
| 1194 | + mw.log('EmbedPlayer::Set native playback'); |
1135 | 1195 | this.selectedSource = playableSources[ source ]; |
1136 | 1196 | return true; |
1137 | 1197 | } |
— | — | @@ -1193,9 +1253,9 @@ |
1194 | 1254 | */ |
1195 | 1255 | hasStreamOfMIMEType: function( mimeType ) |
1196 | 1256 | { |
1197 | | - for ( source in this.sources ) |
| 1257 | + for ( var i = 0; i < this.sources.length; i++ ) |
1198 | 1258 | { |
1199 | | - if ( this.sources[source].getMIMEType() == mimeType ){ |
| 1259 | + if ( this.sources[i].getMIMEType() == mimeType ){ |
1200 | 1260 | return true; |
1201 | 1261 | } |
1202 | 1262 | } |
— | — | @@ -1472,7 +1532,7 @@ |
1473 | 1533 | .attr( 'src', customSource.src ); |
1474 | 1534 | // xxx todo pull list of valid source attributes from mediaSource prototype |
1475 | 1535 | if( customSource.type ){ |
1476 | | - $source.attr('type', customSource.type ) |
| 1536 | + $source.attr('type', customSource.type ); |
1477 | 1537 | } |
1478 | 1538 | if( customSource.title ){ |
1479 | 1539 | $source.attr('title', customSource.title ); |
— | — | @@ -1618,6 +1678,7 @@ |
1619 | 1679 | finishCheckPlayerSources(); |
1620 | 1680 | } |
1621 | 1681 | }, |
| 1682 | + |
1622 | 1683 | /** |
1623 | 1684 | * Insert and play a video source ( useful for ads or bumper videos ) |
1624 | 1685 | * |
— | — | @@ -1722,7 +1783,6 @@ |
1723 | 1784 | /** |
1724 | 1785 | * Check for timed Text support |
1725 | 1786 | * and load necessary libraries |
1726 | | - * |
1727 | 1787 | */ |
1728 | 1788 | checkForTimedText: function( ) { |
1729 | 1789 | var _this = this; |
— | — | @@ -1766,8 +1826,6 @@ |
1767 | 1827 | } |
1768 | 1828 | |
1769 | 1829 | if ( this.selectedPlayer ) { |
1770 | | - mw.log( "Playback system: " + this.selectedPlayer.library ); |
1771 | | - |
1772 | 1830 | // Inherit the playback system of the selected player: |
1773 | 1831 | this.inheritEmbedPlayer(); |
1774 | 1832 | } else { |
— | — | @@ -2141,7 +2199,7 @@ |
2142 | 2200 | }) |
2143 | 2201 | .text( gM( 'mwe-embedplayer-download_clip' ) ) |
2144 | 2202 | ) |
2145 | | - ) |
| 2203 | + ); |
2146 | 2204 | } |
2147 | 2205 | // hide |
2148 | 2206 | }, |
— | — | @@ -2415,8 +2473,10 @@ |
2416 | 2474 | // so we have to do a full replace ( if controls are not included initially ) |
2417 | 2475 | if( mw.isMobileHTML5() && mobileSafariNeedsRefresh ) { |
2418 | 2476 | var source = this.mediaElement.getSources( 'video/h264' )[0]; |
2419 | | - if( source && ! source.src ){ |
2420 | | - mw.log( 'Error: should have caught no playable sources for mobile safari earlier' ); |
| 2477 | + // XXX note this should be updated once mobile supports h.264 |
| 2478 | + if( !source || !source.src ){ |
| 2479 | + mw.log( 'Warning: Your probably fakeing the iPhone userAgent ( no h.264 source )' ); |
| 2480 | + source = this.mediaElement.getSources( 'video/ogg' )[0]; |
2421 | 2481 | } |
2422 | 2482 | |
2423 | 2483 | var videoAttribues = { |
— | — | @@ -2637,7 +2697,7 @@ |
2638 | 2698 | doLinkBack: function() { |
2639 | 2699 | if ( ! this.linkback && this.roe && this.mediaElement.addedROEData == false ) { |
2640 | 2700 | var _this = this; |
2641 | | - this.displayMenuOverlay( gM( 'mwe-embedplayer-loading_txt' ) ); |
| 2701 | + this.displayMenuOverlay( gM( 'mwe-loading_txt' ) ); |
2642 | 2702 | this.getMvJsonUrl( this.roe, function( data ) { |
2643 | 2703 | _this.mediaElement.addROE( data ); |
2644 | 2704 | _this.doLinkBack(); |
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/mw.PlayerControlBuilder.js |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | */ |
147 | 147 | addControlComponents: function( ) { |
148 | 148 | var _this = this; |
149 | | - mw.log( 'f:controlsBuilder:: opt:' + this.options ); |
| 149 | + mw.log( 'PlayerControlsBuilder:: addControlComponents' ); |
150 | 150 | |
151 | 151 | // Set up local pointer to the embedPlayer |
152 | 152 | var embedPlayer = this.embedPlayer; |
— | — | @@ -618,7 +618,7 @@ |
619 | 619 | if( this.embedPlayer.getPlayerElement ){ |
620 | 620 | $j( this.embedPlayer.getPlayerElement() ).css( 'z-index', '1' ); |
621 | 621 | } |
622 | | - mw.log( 'showControlBar' ); |
| 622 | + mw.log( 'PlayerControlBuilder:: ShowControlBar' ); |
623 | 623 | // Move up text track if present |
624 | 624 | this.embedPlayer.$interface.find( '.track' ) |
625 | 625 | .animate( |
— | — | @@ -929,7 +929,7 @@ |
930 | 930 | gM( 'mwe-embedplayer-download' ), |
931 | 931 | 'disk', |
932 | 932 | function( ) { |
933 | | - ctrlObj.displayMenuOverlay( gM('mwe-embedplayer-loading_txt' ) ); |
| 933 | + ctrlObj.displayMenuOverlay( gM('mwe-loading_txt' ) ); |
934 | 934 | // Call show download with the target to be populated |
935 | 935 | ctrlObj.showDownload( |
936 | 936 | ctrlObj.embedPlayer.$interface.find( '.overlay-content' ) |
— | — | @@ -1340,14 +1340,25 @@ |
1341 | 1341 | showDownload: function( $target ) { |
1342 | 1342 | var _this = this; |
1343 | 1343 | var embedPlayer = this.embedPlayer; |
| 1344 | + |
1344 | 1345 | // Load the roe if available (to populate out download options: |
1345 | 1346 | // mw.log('f:showDownload '+ this.roe + ' ' + this.mediaElement.addedROEData); |
1346 | 1347 | if ( embedPlayer.roe && embedPlayer.mediaElement.addedROEData == false ) { |
1347 | | - $target.html( gM( 'mwe-embedplayer-loading_txt' ) ); |
| 1348 | + $target.html( gM( 'mwe-loading_txt' ) ); |
1348 | 1349 | embedPlayer.getMvJsonUrl( this.roe, function( data ) { |
1349 | 1350 | embedPlayer.mediaElement.addROE( data ); |
1350 | 1351 | _this.showDownloadWithSources( $target ); |
1351 | 1352 | } ); |
| 1353 | + |
| 1354 | + // Load additional text sources via apiTitleKey: |
| 1355 | + // @@ todo we should move this to timedText bindings |
| 1356 | + } else if( embedPlayer.apiTitleKey ) { |
| 1357 | + // Load text interface ( if not already loaded ) |
| 1358 | + mw.load( 'TimedText', function() { |
| 1359 | + embedPlayer.timedText.setupTextSources(function(){ |
| 1360 | + _this.showDownloadWithSources( $target ); |
| 1361 | + }); |
| 1362 | + }); |
1352 | 1363 | } else { |
1353 | 1364 | _this.showDownloadWithSources( $target ); |
1354 | 1365 | } |
— | — | @@ -1365,7 +1376,7 @@ |
1366 | 1377 | $target.empty(); |
1367 | 1378 | |
1368 | 1379 | var $mediaList = $j( '<ul />' ); |
1369 | | - var $textList = $j( '<ul />' ); |
| 1380 | + var $textList = $j( '<ul />' ); |
1370 | 1381 | $j.each( embedPlayer.mediaElement.getSources(), function( index, source ) { |
1371 | 1382 | if( source.getSrc() ) { |
1372 | 1383 | mw.log("showDownloadWithSources:: Add src: " + source.getTitle() ); |
— | — | @@ -1379,7 +1390,7 @@ |
1380 | 1391 | //Add link to time segment: |
1381 | 1392 | if ( source.getSrc().indexOf( '?t=' ) !== -1 ) { |
1382 | 1393 | $target.append( $dl_line ); |
1383 | | - } else if ( this.getMIMEType() == "text/cmml" || this.getMIMEType() == "text/x-srt" ) { |
| 1394 | + } else if ( this.getMIMEType().indexOf('text') === 0 ) { |
1384 | 1395 | // Add link to text list |
1385 | 1396 | $textList.append( $dl_line ); |
1386 | 1397 | } else { |
— | — | @@ -1632,7 +1643,7 @@ |
1633 | 1644 | 'volumeControl': { |
1634 | 1645 | 'w' : 28, |
1635 | 1646 | 'o' : function( ctrlObj ) { |
1636 | | - mw.log( ' set up volume control for: ' + ctrlObj.embedPlayer.id ); |
| 1647 | + mw.log( 'PlayerControlBuilder::Set up volume control for: ' + ctrlObj.embedPlayer.id ); |
1637 | 1648 | $volumeOut = $j( '<span />' ); |
1638 | 1649 | if ( ctrlObj.volume_layout == 'horizontal' ) { |
1639 | 1650 | $volumeOut.append( |
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/kskin/mw.style.PlayerSkinKskin.css |
— | — | @@ -166,6 +166,7 @@ |
167 | 167 | .k-player .k-menu-screens { |
168 | 168 | float: left; |
169 | 169 | font-size: 11px; |
| 170 | + text-align: left; |
170 | 171 | padding: 13px 10px 15px 15px; |
171 | 172 | } |
172 | 173 | |
— | — | @@ -412,4 +413,4 @@ |
413 | 414 | width : 51px; |
414 | 415 | height : 12px; |
415 | 416 | cursor: pointer; |
416 | | -} |
\ No newline at end of file |
| 417 | +} |
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js |
— | — | @@ -312,7 +312,7 @@ |
313 | 313 | break; |
314 | 314 | case 'download' : |
315 | 315 | embedPlayer.$interface.find( '.menu-download').text( |
316 | | - gM('mwe-embedplayer-loading_txt' ) |
| 316 | + gM('mwe-loading_txt' ) |
317 | 317 | ); |
318 | 318 | // Call show download with the target to be populated |
319 | 319 | this.showDownload( |
— | — | @@ -390,7 +390,7 @@ |
391 | 391 | if ( data.query.pages ) { |
392 | 392 | for ( var i in data.query.pages ) { |
393 | 393 | var imageProps = data.query.pages[i]; |
394 | | - // Check properites for "missing" |
| 394 | + // Check properties for "missing" |
395 | 395 | if( imageProps.imageinfo && imageProps.imageinfo[0] && imageProps.imageinfo[0].descriptionurl ){ |
396 | 396 | // Found page |
397 | 397 | $target.find( '.credits_box' ).html( |
Index: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.loader.js |
— | — | @@ -0,0 +1,163 @@ |
| 2 | +/** |
| 3 | +* EmbedPlayer loader |
| 4 | +*/ |
| 5 | + |
| 6 | +/** |
| 7 | +* Default player module configuration |
| 8 | +*/ |
| 9 | +( function( mw ) { |
| 10 | + |
| 11 | + mw.setDefaultConfig( { |
| 12 | + // What tags will be re-written to video player by default |
| 13 | + // Set to empty string or null to avoid automatic video tag rewrites to embedPlayer |
| 14 | + "EmbedPlayer.RewriteTags" : "video,audio,playlist" |
| 15 | + } ); |
| 16 | + |
| 17 | + /** |
| 18 | + * Check the current DOM for any tags in "EmbedPlayer.RewriteTags" |
| 19 | + */ |
| 20 | + mw.documentHasPlayerTags = function() { |
| 21 | + var rewriteTags = mw.getConfig( 'EmbedPlayer.RewriteTags' ); |
| 22 | + if( $j( rewriteTags ).length != 0 ) { |
| 23 | + return true; |
| 24 | + } |
| 25 | + |
| 26 | + var tagCheckObject = { 'hasTags' : false }; |
| 27 | + $j( mw ).trigger( 'LoaderEmbedPlayerDocumentHasPlayerTags', |
| 28 | + [ tagCheckObject ]); |
| 29 | + |
| 30 | + return tagCheckObject.hasTags; |
| 31 | + }; |
| 32 | + |
| 33 | + /** |
| 34 | + * Add a DOM ready check for player tags |
| 35 | + * |
| 36 | + * We use mw.addSetupHook instead of mw.ready so that |
| 37 | + * mwEmbed player is setup before any other mw.ready calls |
| 38 | + */ |
| 39 | + mw.addSetupHook( function( callback ) { |
| 40 | + mw.rewritePagePlayerTags(); |
| 41 | + // Run the setupFlag to continue setup |
| 42 | + callback(); |
| 43 | + }); |
| 44 | + |
| 45 | + mw.rewritePagePlayerTags = function() { |
| 46 | + mw.log( 'EmbedPlayer:: Document::' + mw.documentHasPlayerTags() ); |
| 47 | + if( mw.documentHasPlayerTags() ) { |
| 48 | + var rewriteElementCount = 0; |
| 49 | + |
| 50 | + // Set each player to loading ( as early on as possible ) |
| 51 | + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function( index, element ){ |
| 52 | + |
| 53 | + // Assign an the element an ID ( if its missing one ) |
| 54 | + if ( $j( element ).attr( "id" ) == '' ) { |
| 55 | + $j( element ).attr( "id", 'v' + ( rewriteElementCount++ ) ); |
| 56 | + } |
| 57 | + // Add an absolute positioned loader |
| 58 | + $j( element ) |
| 59 | + .getAbsoluteOverlaySpinner() |
| 60 | + .attr('id', 'loadingSpinner_' + $j( element ).attr('id') ) |
| 61 | + .addClass( 'playerLoadingSpinner' ); |
| 62 | + |
| 63 | + }); |
| 64 | + // Load the embedPlayer module ( then run queued hooks ) |
| 65 | + mw.load( 'EmbedPlayer', function ( ) { |
| 66 | + mw.log("EmbedPlayer:: do rewrite players:" + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).length ); |
| 67 | + // Rewrite the EmbedPlayer.RewriteTags with the |
| 68 | + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).embedPlayer(); |
| 69 | + }) |
| 70 | + } |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * Add the module loader function: |
| 75 | + */ |
| 76 | + mediaWiki.loader.register( 'EmbedPlayer', function(){ |
| 77 | + // Hide videonojs class |
| 78 | + $j( '.videonojs' ).hide(); |
| 79 | + |
| 80 | + // Set up the embed video player class request: (include the skin js as well) |
| 81 | + var baseRequest = [ |
| 82 | + 'mw.EmbedPlayer' |
| 83 | + |
| 84 | + 'mw.PlayerControlBuilder', |
| 85 | + '$j.fn.hoverIntent', |
| 86 | + 'mw.style.EmbedPlayer', |
| 87 | + '$j.cookie', |
| 88 | + |
| 89 | + // Add JSON lib if browsers does not define "JSON" natively |
| 90 | + 'JSON', |
| 91 | + '$j.ui', |
| 92 | + '$j.widget' |
| 93 | + |
| 94 | + '$j.ui.mouse', |
| 95 | + '$j.fn.menu', |
| 96 | + 'mw.style.jquerymenu', |
| 97 | + '$j.ui.slider' |
| 98 | + ]; |
| 99 | + |
| 100 | + // Pass every tag being rewritten through the update request function |
| 101 | + $j( mw.getConfig( 'EmbedPlayer.RewriteTags' ) ).each( function() { |
| 102 | + var playerElement = this; |
| 103 | + mw.embedPlayerUpdateLibraryRequest( playerElement, dependencyRequest[ 1 ] ) |
| 104 | + } ); |
| 105 | + |
| 106 | + // Add PNG fix code needed: |
| 107 | + if ( $j.browser.msie && $j.browser.version < 7 ) { |
| 108 | + dependencyRequest[0].push( '$j.fn.pngFix' ); |
| 109 | + } |
| 110 | + |
| 111 | + // Do short detection, to avoid extra player library request in ~most~ cases. |
| 112 | + //( If browser is firefox include native, if browser is IE include java ) |
| 113 | + if( $j.browser.msie ) { |
| 114 | + dependencyRequest[0].push( 'mw.EmbedPlayerJava' ) |
| 115 | + } |
| 116 | + |
| 117 | + // Safari gets slower load since we have to detect ogg support |
| 118 | + if( !!document.createElement('video').canPlayType && !$j.browser.safari ) { |
| 119 | + dependencyRequest[0].push( 'mw.EmbedPlayerNative' ) |
| 120 | + } |
| 121 | + |
| 122 | + // Return the set of libs to be loaded |
| 123 | + return dependencyRequest; |
| 124 | + }); |
| 125 | + mw.addModuleLoader( 'EmbedPlayer', function() { |
| 126 | + var _this = this; |
| 127 | + } ); |
| 128 | + |
| 129 | + /** |
| 130 | + * Takes a embed player element and updates a request object with any |
| 131 | + * dependent libraries per that tags attributes. |
| 132 | + * |
| 133 | + * For example a player skin class name could result in adding some |
| 134 | + * css and javascirpt to the player library request. |
| 135 | + * |
| 136 | + * @param {Object} playerElement The tag to check for library dependent request classes. |
| 137 | + * @param {Array} dependencyRequest The library request array |
| 138 | + */ |
| 139 | + mw.embedPlayerUpdateLibraryRequest = function(playerElement, dependencyRequest ){ |
| 140 | + var skinName = $j( playerElement ).attr( 'class' ); |
| 141 | + // Set playerClassName to default if unset or not a valid skin |
| 142 | + if( ! skinName || $j.inArray( skinName.toLowerCase(), mw.validSkins ) == -1 ){ |
| 143 | + skinName = mw.getConfig( 'EmbedPlayer.SkinName' ); |
| 144 | + } |
| 145 | + skinName = skinName.toLowerCase(); |
| 146 | + // Add the skin to the request |
| 147 | + var skinCaseName = skinName.charAt(0).toUpperCase() + skinName.substr(1); |
| 148 | + |
| 149 | + // The skin js: |
| 150 | + if( $j.inArray( 'mw.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){ |
| 151 | + dependencyRequest.push( 'mw.PlayerSkin' + skinCaseName ); |
| 152 | + } |
| 153 | + |
| 154 | + // The skin css |
| 155 | + if( $j.inArray( 'mw.style.PlayerSkin' + skinCaseName, dependencyRequest ) == -1 ){ |
| 156 | + dependencyRequest.push( 'mw.style.PlayerSkin' + skinCaseName ); |
| 157 | + } |
| 158 | + |
| 159 | + // Allow extension to extend the request. |
| 160 | + $j( mw ).trigger( 'LoaderEmbedPlayerUpdateRequest', |
| 161 | + [ playerElement, dependencyRequest ] ); |
| 162 | + } |
| 163 | + |
| 164 | +} )( window.mw ); |
Property changes on: branches/querypage-work2/extensions/TimedMediaHandler/EmbedPlayer/EmbedPlayer.loader.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 165 | + native |
Property changes on: branches/querypage-work2/extensions/LiquidThreads |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2 | 166 | Merged /trunk/extensions/LiquidThreads:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/UploadWizard/resources/mw.LanguageUpWiz.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
3 | 167 | Merged /trunk/extensions/UploadWizard/resources/mw.LanguageUpWiz.js:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions/ContactPageFundraiser |
___________________________________________________________________ |
Modified: svn:mergeinfo |
4 | 168 | Merged /trunk/extensions/ContactPageFundraiser:r74986,74989,74991-74994,74998 |
Property changes on: branches/querypage-work2/extensions |
___________________________________________________________________ |
Modified: svn:mergeinfo |
5 | 169 | Merged /trunk/extensions:r74986,74989,74991-74994,74998 |