Index: branches/js2-work/phase3/js/mwEmbed/tests/Playlist_Render.html |
— | — | @@ -25,17 +25,14 @@ |
26 | 26 | }); |
27 | 27 | |
28 | 28 | $j('#loading_text').hide(); |
| 29 | + $j('#info_control').show(); |
29 | 30 | if( foggRender.enabled ){ |
30 | | - $j('#info_control').show(); |
| 31 | + |
31 | 32 | }else{ |
| 33 | + var firefoggUrl = foggRender.myFogg.getFirefoggInstallUrl(); |
32 | 34 | $j('#info_control').html( |
33 | | - foggRender.myFogg.getTargetHtml('target_please_install') |
34 | | - ); |
35 | | - if(!($j.browser.mozilla && $j.browser.version >= '1.9.1')) { |
36 | | - $j('#info_control').html( |
37 | | - foggRender.myFogg.getTargetHtml('target_use_latest_fox') |
38 | | - ); |
39 | | - } |
| 35 | + gM( 'fogg-please_install', firefoggUrl ) |
| 36 | + ) |
40 | 37 | } |
41 | 38 | |
42 | 39 | }); |
— | — | @@ -44,16 +41,16 @@ |
45 | 42 | </script> |
46 | 43 | </head> |
47 | 44 | <body> |
48 | | - <!-- <playlist id="render_player" src="media/sample_smil.xml" controls="false" width="320" height="240"></playlist> --> |
| 45 | + <playlist id="render_player" src="media/sample_smil.xml" controls="false" width="320" height="240"></playlist> |
49 | 46 | |
50 | 47 | |
51 | | -<video id="render_player" |
| 48 | + <!--<video id="render_player" |
52 | 49 | durationHint="5" |
53 | 50 | src="http://upload.wikimedia.org/wikipedia/commons/4/41/Panthera_tigris8.ogg" |
54 | 51 | style="width:320px;height:240px;" |
55 | 52 | controls="false" |
56 | 53 | poster="http://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Panthera_tigris8.ogg/mid-Panthera_tigris8.ogg.jpg"> |
57 | | -</video> |
| 54 | +</video> --> |
58 | 55 | |
59 | 56 | |
60 | 57 | <span id="loading_text" style="position:absolute; top:320px;"> |
Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -330,7 +330,7 @@ |
331 | 331 | return false; |
332 | 332 | |
333 | 333 | // See if we have native support for ogg: |
334 | | - var supporting_players = embedTypes.players.getMIMETypePlayers( 'video/ogg' ); |
| 334 | + var supporting_players = mw.EmbedTypes.players.getMIMETypePlayers( 'video/ogg' ); |
335 | 335 | for ( var i = 0; i < supporting_players.length; i++ ) { |
336 | 336 | if ( supporting_players[i].id == 'videoElement' ) { |
337 | 337 | return false; |
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedText.js |
— | — | @@ -1130,10 +1130,8 @@ |
1131 | 1131 | } ); |
1132 | 1132 | |
1133 | 1133 | return captions; |
1134 | | - } |
| 1134 | + } |
1135 | 1135 | |
1136 | | - |
1137 | | - |
1138 | 1136 | /** |
1139 | 1137 | * Text Providers |
1140 | 1138 | * |
Index: branches/js2-work/phase3/js/mwEmbed/modules/TimedText/mw.TimedTextEdit.js |
— | — | @@ -293,7 +293,7 @@ |
294 | 294 | * Uploads the text content |
295 | 295 | */ |
296 | 296 | uploadTextFile: function(){ |
297 | | - //put a dialog ontop |
| 297 | + // Put a dialog ontop |
298 | 298 | mw.addLoaderDialog( gM( 'mwe-uploading-text') ); |
299 | 299 | |
300 | 300 | // Get timed text target title |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js |
— | — | @@ -66,16 +66,17 @@ |
67 | 67 | // this.more_results = true; |
68 | 68 | //} |
69 | 69 | for ( var resource_id in data ) { |
70 | | - var result = data[ resource_id ]; |
71 | | - |
72 | | - // Update mapings: |
| 70 | + var result = data[ resource_id ]; |
| 71 | + // Update mappings: |
73 | 72 | result['poster'] = result['thumbnail']; |
74 | 73 | result['pSobj'] = _this; |
75 | 74 | result['link'] = result[ 'item_details_page' ]; |
76 | 75 | |
77 | | - if( !result['titleKey'] && result['src'] ){ |
78 | | - result['titleKey'] = 'File:' + result['src'].split('/').pop(); |
79 | | - } |
| 76 | + //@@todo this should be refactored per search library |
| 77 | + //or gennerated at request time for mediaWiki |
| 78 | + var ext = this.getMimeExtension( result['mime'] ); |
| 79 | + result['titleKey'] = 'File:' + result['title'] + '.' + ext; |
| 80 | + |
80 | 81 | _this.resultsObj[ resource_id ] = result; |
81 | 82 | |
82 | 83 | } |
— | — | @@ -96,7 +97,16 @@ |
97 | 98 | searchLib.getImageObj( resource, size, callback ); |
98 | 99 | }); |
99 | 100 | }, |
100 | | - |
| 101 | + /* |
| 102 | + * Get extra resource info via a library specific callback |
| 103 | + * NOTE: this info should be included in the original kaltura search results |
| 104 | + */ |
| 105 | + addResourceInfoCallback: function( resource, callback ){ |
| 106 | + mw.log('Kaltura: addResourceInfoCallback'); |
| 107 | + this.getSerachLib( resource.content_provider_id, function( searchLib ){ |
| 108 | + searchLib.addResourceInfoCallback( resource, callback ); |
| 109 | + }); |
| 110 | + }, |
101 | 111 | /** |
102 | 112 | * Get and load provider via id |
103 | 113 | * @param {String} provider_id The id of the content provider |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/baseRemoteSearch.js |
— | — | @@ -206,6 +206,7 @@ |
207 | 207 | getEmbedHTML: function( resource , options ) { |
208 | 208 | if ( !options ) |
209 | 209 | options = { }; |
| 210 | + |
210 | 211 | // Set up the output var with the default values: |
211 | 212 | if(! options.width ) |
212 | 213 | options.width = resource.width; |
— | — | @@ -219,22 +220,23 @@ |
220 | 221 | } |
221 | 222 | |
222 | 223 | options.style = ''; |
223 | | - if( options.height ) |
| 224 | + if( options.height ){ |
224 | 225 | options.style += 'height:' + options.height + 'px;'; |
225 | | - |
226 | | - if( options.width ) |
| 226 | + } |
| 227 | + if( options.width ){ |
227 | 228 | options.style += 'width:' + options.width + 'px;'; |
228 | | - |
| 229 | + } |
229 | 230 | if ( resource.mime.indexOf( 'image' ) != -1 ) |
230 | 231 | outHtml = this.getImageEmbedHTML( resource, options ); |
231 | 232 | |
232 | 233 | if ( resource.mime == 'application/ogg' || resource.mime == 'video/ogg' || resource.mime == 'audio/ogg' ) { |
233 | | - // Setup the attribute html: |
| 234 | + // Setup the attribute html (can't use jQuery builder for video element in a cross browser friendly way.) |
234 | 235 | var ahtml = ( options['id'] ) ? ' id = "' + options['id'] + '" ': ''; |
235 | 236 | ahtml+= 'src="' + resource.src + '" ' + |
236 | 237 | 'style="' + options.style + '" ' + |
237 | | - 'poster="' + resource.poster + '" '; |
238 | | - |
| 238 | + 'poster="' + resource.poster + '" '+ |
| 239 | + 'type="' + resource.mime + '" '; |
| 240 | + |
239 | 241 | if ( resource.mime == 'application/ogg' || resource.mime == 'video/ogg' ) { |
240 | 242 | outHtml = '<video ' + ahtml + '></video>'; |
241 | 243 | } |
— | — | @@ -430,5 +432,21 @@ |
431 | 433 | resource.target_resource_title = resource.titleKey.replace( /^(File:|Image:)/ , '' ); |
432 | 434 | resource.target_resource_title = this.provider.resource_prefix + resource.target_resource_title; |
433 | 435 | } |
| 436 | + }, |
| 437 | + |
| 438 | + /** |
| 439 | + * Utily to convert from mime type to extension |
| 440 | + */ |
| 441 | + getMimeExtension: function( mime ){ |
| 442 | + if( mime == 'video/ogg' || mime == 'application/ogg' ) |
| 443 | + return 'ogv'; |
| 444 | + if( mime == 'audio/ogg' ) |
| 445 | + return 'oga'; |
| 446 | + if( mime == 'image/jpeg' ) |
| 447 | + return 'jpg'; |
| 448 | + if( mime == 'image/png' ) |
| 449 | + return 'png'; |
| 450 | + if( mime == 'image/svg+xml' ) |
| 451 | + return 'svg'; |
434 | 452 | } |
435 | 453 | } |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/archiveOrgSearch.js |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | var resource = { |
81 | 81 | // @@todo we should add .ogv or oga if video or audio: |
82 | 82 | 'titleKey' : resource.identifier + '.ogv', |
83 | | - 'resourceKey': resource.identifier, |
| 83 | + 'id': resource.identifier, |
84 | 84 | 'link' : _this.detailsUrl + resource.identifier, |
85 | 85 | 'title' : resource.title, |
86 | 86 | 'poster' : _this.downloadUrl + resource.identifier + '/format=thumbnail', |
— | — | @@ -104,11 +104,11 @@ |
105 | 105 | * @param {Object} resource Resource to add metadata to. |
106 | 106 | * @param {Function} callbcak Function called once extra metadata is added. |
107 | 107 | */ |
108 | | - addResourceInfoCallback: function( resource, callback ) { |
| 108 | + addResourceInfoCallback: function( resource, callback ) { |
109 | 109 | var _this = this; |
110 | | - mw.log( 'addResourceInfoCallback' ); |
| 110 | + mw.log( 'archiveOrg: addResourceInfoCallback' ); |
111 | 111 | mw.getJSON( |
112 | | - _this.downloadUrl + resource.resourceKey + '/format=Ogg+video?callback=?', |
| 112 | + _this.downloadUrl + resource.id + '/format=Ogg+video?callback=?', |
113 | 113 | { 'avinfo' : 1 }, |
114 | 114 | function( data ) { |
115 | 115 | if ( data['length'] ) |
— | — | @@ -120,7 +120,7 @@ |
121 | 121 | callback(); |
122 | 122 | } ); |
123 | 123 | }, |
124 | | - |
| 124 | + |
125 | 125 | /** |
126 | 126 | * Returns html to embed a given result Object ( resource ) |
127 | 127 | * @param {Object} resource Resource to get embed HTML from. |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -22,7 +22,6 @@ |
23 | 23 | "rsd_resource_edit" : "Edit resource: $1", |
24 | 24 | "mwe-resource_description_page" : "Resource description page", |
25 | 25 | "mwe-link" : "link", |
26 | | - "rsd_local_resource_title" : "Local resource title", |
27 | 26 | "rsd_do_insert" : "Do insert", |
28 | 27 | "mwe-cc_title" : "Creative Commons", |
29 | 28 | "mwe-cc_by_title" : "Attribution", |
— | — | @@ -283,6 +282,7 @@ |
284 | 283 | 'homepage': 'http://kaltura.com', |
285 | 284 | 'api_url': 'http://kaldev.kaltura.com/michael/aggregator.php', |
286 | 285 | 'lib': 'kaltura', |
| 286 | + 'resource_prefix' : '', |
287 | 287 | 'tab_image':false |
288 | 288 | }, |
289 | 289 | |
— | — | @@ -853,47 +853,47 @@ |
854 | 854 | createControlContainer: function() { |
855 | 855 | var _this = this; |
856 | 856 | |
857 | | - var controlContainer = $j('<div />').addClass("rsd_control_container"); |
858 | | - var searchForm = $j('<form />').attr({ |
859 | | - id:"rsd_form", |
860 | | - action:"javascript:return false" |
| 857 | + var $controlContainer = $j('<div />').addClass("rsd_control_container"); |
| 858 | + var $searchForm = $j('<form />').attr({ |
| 859 | + id : "rsd_form", |
| 860 | + action : "javascript:return false" |
861 | 861 | }); |
862 | | - var providerSelection = $j('<ul />').addClass("ui-provider-selection"); |
| 862 | + var $providerSelection = $j('<ul />').addClass("ui-provider-selection"); |
863 | 863 | |
864 | 864 | // Add enabled search providers. |
865 | | - for (var providerName in this.content_providers) { |
| 865 | + for ( var providerName in this.content_providers ) { |
866 | 866 | var content_providers = this.content_providers; |
867 | 867 | var provider = content_providers[ providerName ]; |
868 | | - if (provider.enabled && provider.checked && provider.api_url) { |
869 | | - var anchor = $j('<div />') |
870 | | - .text(gM('rsd-' + providerName + '-title')) |
| 868 | + if (provider.enabled && provider.checked && provider.api_url ) { |
| 869 | + var $anchor = $j('<div />') |
| 870 | + .text( gM('rsd-' + providerName + '-title') ) |
871 | 871 | .attr({ |
872 | 872 | name: providerName |
873 | 873 | }); |
874 | | - if (this.current_provider == providerName) { |
875 | | - anchor.addClass('ui-selected'); |
| 874 | + if ( this.current_provider == providerName) { |
| 875 | + $anchor.addClass('ui-selected'); |
876 | 876 | } |
877 | 877 | |
878 | | - anchor.click( function() { |
879 | | - $j(this).parent().parent().find('.ui-selected') |
880 | | - .removeClass('ui-selected') |
881 | | - .each(function(index, domElement) { |
| 878 | + $anchor.click( function() { |
| 879 | + $j( this ).parent().parent().find( '.ui-selected' ) |
| 880 | + .removeClass( 'ui-selected' ) |
| 881 | + .each( function( index, domElement ) { |
882 | 882 | /*var selectedProvider = $j(domElement).attr("name") |
883 | 883 | if (selectedProvider) |
884 | 884 | content_providers[ selectedProvider ].checked = false;*/ |
885 | 885 | //TODO: unset flag for provider selection |
886 | 886 | }); |
887 | | - $j(this).addClass('ui-selected'); |
| 887 | + $j( this ).addClass( 'ui-selected' ); |
888 | 888 | //TODO: set flag for provider selection |
889 | 889 | }); |
890 | 890 | |
891 | | - var listItem = $j('<li />'); |
892 | | - listItem.append(anchor); |
893 | | - providerSelection.append(listItem); |
| 891 | + var $listItem = $j( '<li />' ); |
| 892 | + $listItem.append( $anchor ); |
| 893 | + $providerSelection.append( $listItem ); |
894 | 894 | } |
895 | 895 | } |
896 | 896 | |
897 | | - var searchBox = $j('<input />').addClass('ui-widget-content ui-corner-all').attr({ |
| 897 | + var $searchBox = $j('<input />').addClass('ui-widget-content ui-corner-all').attr({ |
898 | 898 | type: "text", |
899 | 899 | tabindex: 1, |
900 | 900 | value: this.getDefaultQuery(), |
— | — | @@ -903,29 +903,30 @@ |
904 | 904 | size: 20, |
905 | 905 | autocomplete: "off" |
906 | 906 | }); |
907 | | - var searchButton = $j.button({icon_id: 'search', text: 'search'}) |
908 | | - .addClass('rsd_search_button') |
| 907 | + var $searchButton = $j.button({icon_id: 'search', text: gM('mwe-media_search') }) |
| 908 | + .addClass( 'rsd_search_button' ) |
909 | 909 | .buttonHover() |
910 | 910 | .click(function (){ |
911 | 911 | //TODO: Add search provider call. |
912 | 912 | _this.showCurrentTab(); |
913 | 913 | }); |
914 | | - searchForm.append(providerSelection); |
915 | | - searchForm.append(searchBox); |
916 | | - searchForm.append(searchButton); |
917 | 914 | |
| 915 | + //$searchForm.append( $providerSelection ); |
| 916 | + $searchForm.append( $searchBox ); |
| 917 | + $searchForm.append( $searchButton ); |
| 918 | + /* |
918 | 919 | // Add optional upload buttons. |
919 | 920 | if ( this.content_providers['upload'].enabled) { |
920 | | - uploadButton = $j.button({icon_id: 'upload', text: 'upload'}) |
| 921 | + $uploadButton = $j.button({icon_id: 'upload', text: 'upload'}) |
921 | 922 | .addClass("rsd_upload_button"); |
922 | | - importButton = $j.button({icon_id: 'import', text: 'import'}) |
| 923 | + $importButton = $j.button({icon_id: 'import', text: 'import'}) |
923 | 924 | .addClass("rsd_import_button"); |
924 | | - searchForm.append(uploadButton).append(importButton); |
| 925 | + $searchForm.append( $uploadButton ).append( $importButton ); |
925 | 926 | } |
| 927 | + */ |
| 928 | + $controlContainer.append( $searchForm ); |
926 | 929 | |
927 | | - controlContainer.append(searchForm); |
928 | | - |
929 | | - return controlContainer; |
| 930 | + return $controlContainer; |
930 | 931 | }, |
931 | 932 | |
932 | 933 | /** |
— | — | @@ -2729,4 +2730,4 @@ |
2730 | 2731 | // run /update search display: |
2731 | 2732 | this.showResults(); |
2732 | 2733 | } |
2733 | | -}; |
| 2734 | +}; |
\ No newline at end of file |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/loader.js |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | $j( '.videonojs' ).remove(); |
125 | 125 | |
126 | 126 | // Detect supported players: |
127 | | - embedTypes.init(); |
| 127 | + mw.EmbedTypes.init(); |
128 | 128 | |
129 | 129 | //mw.log(" run callback: " + callback ); |
130 | 130 | |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -238,7 +238,7 @@ |
239 | 239 | * @param {Function} callback Function to call once embeding is done |
240 | 240 | */ |
241 | 241 | $.embedPlayers = function( attributes, callback){ |
242 | | - $j( mw.getConfig( 'rewritePlayerTags' ) ).embedPlayer( attributes, callbcak ); |
| 242 | + $j( mw.getConfig( 'rewritePlayerTags' ) ).embedPlayer( attributes, callback ); |
243 | 243 | } |
244 | 244 | |
245 | 245 | /** |
— | — | @@ -431,7 +431,7 @@ |
432 | 432 | } |
433 | 433 | |
434 | 434 | if( waitForMeta ){ |
435 | | - mw.log(" WaitForMeta ( video missing height width info and has src )"); |
| 435 | + mw.log(" WaitForMeta ( video missing height, width or duration )"); |
436 | 436 | element.removeEventListener( "loadedmetadata", runPlayerSwap, true ); |
437 | 437 | element.addEventListener( "loadedmetadata", runPlayerSwap, true ); |
438 | 438 | // Time-out of 5 seconds ( maybe still playable but no timely metadata ) |
— | — | @@ -940,7 +940,7 @@ |
941 | 941 | if ( i == index ) { |
942 | 942 | this.selected_source = playable_sources[i]; |
943 | 943 | // Update the user selected format: |
944 | | - embedTypes.players.setFormatPreference( playable_sources[i].mime_type ); |
| 944 | + mw.EmbedTypes.players.setFormatPreference( playable_sources[i].mime_type ); |
945 | 945 | break; |
946 | 946 | } |
947 | 947 | } |
— | — | @@ -963,7 +963,7 @@ |
964 | 964 | return true; |
965 | 965 | } |
966 | 966 | // Set via user-preference |
967 | | - if ( embedTypes.players.preference['format_preference'] == mime_type ) { |
| 967 | + if ( mw.EmbedTypes.players.preference['format_preference'] == mime_type ) { |
968 | 968 | mw.log( 'set via preference: ' + playable_sources[source].mime_type ); |
969 | 969 | this.selected_source = playable_sources[source]; |
970 | 970 | return true; |
— | — | @@ -976,8 +976,8 @@ |
977 | 977 | var mime_type = playable_sources[source].mime_type; |
978 | 978 | // set source via player |
979 | 979 | if ( mime_type == 'video/ogg' || mime_type == 'ogg/video' || mime_type == 'video/annodex' || mime_type == 'application/ogg' ) { |
980 | | - for ( var i = 0; i < embedTypes.players.players.length; i++ ) { // for in loop on object oky |
981 | | - var player = embedTypes.players.players[i]; |
| 980 | + for ( var i = 0; i < mw.EmbedTypes.players.players.length; i++ ) { // for in loop on object oky |
| 981 | + var player = mw.EmbedTypes.players.players[i]; |
982 | 982 | if ( player.library == 'vlc' || player.library == 'native' ) { |
983 | 983 | mw.log( 'set via ogg via order' ); |
984 | 984 | this.selected_source = playable_sources[source]; |
— | — | @@ -1042,7 +1042,7 @@ |
1043 | 1043 | * Checks if media is a playable type |
1044 | 1044 | */ |
1045 | 1045 | isPlayableType:function( mime_type ){ |
1046 | | - if ( embedTypes.players.defaultPlayer( mime_type ) ) { |
| 1046 | + if ( mw.EmbedTypes.players.defaultPlayer( mime_type ) ) { |
1047 | 1047 | return true; |
1048 | 1048 | } else { |
1049 | 1049 | return false; |
— | — | @@ -1431,12 +1431,12 @@ |
1432 | 1432 | // debugger; |
1433 | 1433 | // do load player if just displaying innerHTML: |
1434 | 1434 | if ( this.pc.type == 'text/html' ) { |
1435 | | - this.selected_player = embedTypes.players.defaultPlayer( 'text/html' ); |
| 1435 | + this.selected_player = mw.EmbedTypes.players.defaultPlayer( 'text/html' ); |
1436 | 1436 | mw.log( 'set selected player:' + this.selected_player.mime_type ); |
1437 | 1437 | } |
1438 | 1438 | } |
1439 | 1439 | } else { |
1440 | | - this.selected_player = embedTypes.players.defaultPlayer( this.mediaElement.selected_source.mime_type ); |
| 1440 | + this.selected_player = mw.EmbedTypes.players.defaultPlayer( this.mediaElement.selected_source.mime_type ); |
1441 | 1441 | } |
1442 | 1442 | if ( this.selected_player ) { |
1443 | 1443 | mw.log( "Playback system: " + this.selected_player.library ); |
— | — | @@ -2446,7 +2446,7 @@ |
2447 | 2447 | o += '<h2>' + gM( 'mwe-chose_player' ) + '</h2>'; |
2448 | 2448 | var _this = this; |
2449 | 2449 | $j.each( this.mediaElement.getPlayableSources(), function( source_id, source ) { |
2450 | | - var playable = embedTypes.players.defaultPlayer( source.getMIMEType() ); |
| 2450 | + var playable = mw.EmbedTypes.players.defaultPlayer( source.getMIMEType() ); |
2451 | 2451 | |
2452 | 2452 | var is_selected = ( source == _this.mediaElement.selected_source ); |
2453 | 2453 | var image_src = mw.getConfig( 'skin_img_path' ) ; |
— | — | @@ -2456,7 +2456,7 @@ |
2457 | 2457 | if ( playable ) { |
2458 | 2458 | o += '<ul>'; |
2459 | 2459 | // output the player select code: |
2460 | | - var supporting_players = embedTypes.players.getMIMETypePlayers( source.getMIMEType() ); |
| 2460 | + var supporting_players = mw.EmbedTypes.players.getMIMETypePlayers( source.getMIMEType() ); |
2461 | 2461 | |
2462 | 2462 | for ( var i = 0; i < supporting_players.length ; i++ ) { |
2463 | 2463 | if ( _this.selected_player.id == supporting_players[i].id && is_selected ) { |
— | — | @@ -2491,7 +2491,7 @@ |
2492 | 2492 | _this.closeDisplayedHTML(); |
2493 | 2493 | _this.mediaElement.selectSource( source_id ); |
2494 | 2494 | |
2495 | | - embedTypes.players.setPlayerPreference( default_player_id, |
| 2495 | + mw.EmbedTypes.players.setPlayerPreference( default_player_id, |
2496 | 2496 | _this.mediaElement.sources[ source_id ].getMIMEType() ); |
2497 | 2497 | |
2498 | 2498 | // Issue a stop |
— | — | @@ -3224,11 +3224,11 @@ |
3225 | 3225 | }; |
3226 | 3226 | |
3227 | 3227 | /** |
3228 | | - * embedTypes object handles setting and getting of supported embed types: |
| 3228 | + * mw.EmbedTypes object handles setting and getting of supported embed types: |
3229 | 3229 | * closely mirrors OggHandler so that its easier to share efforts in this area: |
3230 | 3230 | * http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/OggHandler/OggPlayer.js |
3231 | 3231 | */ |
3232 | | -var embedTypes = { |
| 3232 | +mw.EmbedTypes = { |
3233 | 3233 | |
3234 | 3234 | // List of players supported |
3235 | 3235 | players: null, |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/javaEmbed.js |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | |
78 | 78 | // Wrap it in an iframe to avoid hanging the event thread in FF 2/3 and similar |
79 | 79 | // Doesn't work in MSIE or Safari/Mac or Opera 9.5 |
80 | | - if ( embedTypes.mozilla ) { |
| 80 | + if ( $j.browser.mozilla ) { |
81 | 81 | var iframe = document.createElement( 'iframe' ); |
82 | 82 | iframe.setAttribute( 'width', params.width ); |
83 | 83 | iframe.setAttribute( 'height', playerHeight ); |
— | — | @@ -182,7 +182,7 @@ |
183 | 183 | * Update the playerElement instance with a pointer to the embed object |
184 | 184 | */ |
185 | 185 | getPlayerElement:function() { |
186 | | - if ( embedTypes.mozilla ) { |
| 186 | + if ( $j.browser.mozilla ) { |
187 | 187 | this.playerElement = window.frames['cframe_' + this.id ].document.getElementById( this.pid ); |
188 | 188 | } else { |
189 | 189 | this.playerElement = $j( '#' + this.pid ).get( 0 ); |
Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js |
— | — | @@ -2341,7 +2341,7 @@ |
2342 | 2342 | return false; |
2343 | 2343 | } |
2344 | 2344 | // Flag to register the domReady has been called |
2345 | | - var mwDomReadyFlag = false; |
| 2345 | + var mwDomReadyFlag = false; |
2346 | 2346 | |
2347 | 2347 | /** |
2348 | 2348 | * This will get called when the DOM is ready |
— | — | @@ -2449,7 +2449,9 @@ |
2450 | 2450 | } ); |
2451 | 2451 | |
2452 | 2452 | |
2453 | | -// Add the core mvEmbed Messages ( will be localized by script server ) |
| 2453 | +/** |
| 2454 | +* Add the core mvEmbed Messages ( will be localized by script server ) |
| 2455 | +*/ |
2454 | 2456 | mw.addMessages( { |
2455 | 2457 | "mwe-loading_txt" : "Loading ...", |
2456 | 2458 | "mwe-size-gigabytes" : "$1 GB", |
— | — | @@ -2522,10 +2524,9 @@ |
2523 | 2525 | mwCheckBody(); |
2524 | 2526 | |
2525 | 2527 | |
2526 | | -/* |
| 2528 | +/** |
2527 | 2529 | * Utility jQuery bindings |
2528 | | - * ( to be run after jQuery is available ). |
2529 | | - * |
| 2530 | + * Setup after jQuery is available ). |
2530 | 2531 | */ |
2531 | 2532 | function mwDojQueryBindings() { |
2532 | 2533 | mw.log( 'mv_jqueryBindings' ); |