Index: branches/MwEmbedStandAlone/mwEmbed.js |
— | — | @@ -21,7 +21,6 @@ |
22 | 22 | if ( typeof window.mw == 'undefined' ) { |
23 | 23 | window.mw = { }; |
24 | 24 | } |
25 | | - |
26 | 25 | /** |
27 | 26 | * Set the mwEmbedVersion |
28 | 27 | */ |
— | — | @@ -83,6 +82,7 @@ |
84 | 83 | } |
85 | 84 | mwConfig[ name ] = value; |
86 | 85 | }; |
| 86 | + |
87 | 87 | /** |
88 | 88 | * Merge in a configuration value: |
89 | 89 | */ |
— | — | @@ -793,6 +793,7 @@ |
794 | 794 | } |
795 | 795 | return moduleList; |
796 | 796 | }, |
| 797 | + |
797 | 798 | /** |
798 | 799 | * Loads javascript or css associated with a resourceName |
799 | 800 | * |
— | — | @@ -1158,7 +1159,20 @@ |
1159 | 1160 | } ); |
1160 | 1161 | return $j( '#mwTempLoaderDialog' ); |
1161 | 1162 | }; |
1162 | | - |
| 1163 | + mw.isIphone = function(){ |
| 1164 | + return ( navigator.userAgent.indexOf('iPhone') != -1 ); |
| 1165 | + }; |
| 1166 | + mw.isIpod = function(){ |
| 1167 | + return ( navigator.userAgent.indexOf('iPod') != -1 ); |
| 1168 | + }; |
| 1169 | + mw.isIpad = function(){ |
| 1170 | + return ( navigator.userAgent.indexOf('iPad') != -1 ); |
| 1171 | + }; |
| 1172 | + // Android 2 has some restrictions vs other mobile platforms |
| 1173 | + mw.isAndroid2 = function(){ |
| 1174 | + return ( navigator.userAgent.indexOf( 'Android 2.') != -1 ); |
| 1175 | + }; |
| 1176 | + |
1163 | 1177 | /** |
1164 | 1178 | * Fallforward system by default prefers flash. |
1165 | 1179 | * |
— | — | @@ -1210,20 +1224,7 @@ |
1211 | 1225 | } |
1212 | 1226 | // No video tag or flash, return false ( normal "install flash" user flow ) |
1213 | 1227 | return false; |
1214 | | - } |
1215 | | - mw.isIphone = function(){ |
1216 | | - return ( navigator.userAgent.indexOf('iPhone') != -1 ); |
1217 | 1228 | }; |
1218 | | - mw.isIpod = function(){ |
1219 | | - return ( navigator.userAgent.indexOf('iPod') != -1 ); |
1220 | | - }; |
1221 | | - mw.isIpad = function(){ |
1222 | | - return ( navigator.userAgent.indexOf('iPad') != -1 ); |
1223 | | - }; |
1224 | | - // Android 2 has some restrictions vs other mobile platforms |
1225 | | - mw.isAndroid2 = function(){ |
1226 | | - return ( navigator.userAgent.indexOf( 'Android 2.') != -1 ); |
1227 | | - }; |
1228 | 1229 | |
1229 | 1230 | /** |
1230 | 1231 | * Similar to php isset function checks if the variable exists. Does a safe |
— | — | @@ -2634,6 +2635,11 @@ |
2635 | 2636 | } |
2636 | 2637 | mw.domReady(); |
2637 | 2638 | } |
| 2639 | +// temporary hack to work around dom ready breakage when loading |
| 2640 | +// dynamically with other dom ready scripts |
| 2641 | +if( typeof KALTURA_LOADER_REV != 'undefined' ){ |
| 2642 | + mw.domReady(); |
| 2643 | +} |
2638 | 2644 | |
2639 | 2645 | |
2640 | 2646 | // If using the resource loader and jQuery has not been set give a warning to |
Index: branches/MwEmbedStandAlone/modules/Playlist/mw.Playlist.js |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | .click( function(){ |
145 | 145 | _this.sourceHandler.setPlaylistIndex( inx ); |
146 | 146 | $j( _this.target + ' .media-rss-video-list').loadingSpinner(); |
147 | | - _this.loadPlaylist( function(){ |
| 147 | + _this.sourceHandler.loadPlaylist( function(){ |
148 | 148 | $j( _this.target + ' .media-rss-video-list').empty(); |
149 | 149 | _this.addMediaList(); |
150 | 150 | }); |
— | — | @@ -350,15 +350,16 @@ |
351 | 351 | this.targetWidth = $j( this.target ).width(); |
352 | 352 | this.targetHeight = $j( this.target ).height(); |
353 | 353 | |
354 | | - /* vertical layout */ |
| 354 | + |
355 | 355 | if( _this.layout == 'vertical' ){ |
| 356 | + /* vertical layout */ |
356 | 357 | var pa = this.playerAspect.split(':'); |
357 | 358 | this.targetPlayerSize = { |
358 | 359 | 'width' : this.targetWidth + 'px', |
359 | 360 | 'height' : parseInt( ( pa[1] / pa[0] ) * this.targetWidth ) |
360 | 361 | }; |
361 | 362 | } else { |
362 | | - /* horizontal layout */ |
| 363 | + /* horizontal layout */ |
363 | 364 | var pa = this.playerAspect.split(':'); |
364 | 365 | this.targetPlayerSize = { |
365 | 366 | 'height' : ( this.targetHeight - this.titleHeight ) + 'px', |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | var _this = this; |
116 | 116 | // Run the seeking hook |
117 | 117 | |
118 | | - $j( this.embedPlayer ).trigger( 'onSeek' ); |
| 118 | + $j( this.embedPlayer ).trigger( 'seeking' ); |
119 | 119 | this.setCurrentTime( percentage * this.getDuration(), function(){ |
120 | 120 | mw.log("EmbedPlayerSmil:: seek done"); |
121 | 121 | _this.seeking = false; |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/kskin/mw.PlayerSkinKskin.js |
— | — | @@ -385,7 +385,7 @@ |
386 | 386 | var $target = embedPlayer.$interface.find( '.menu-credits' ); |
387 | 387 | |
388 | 388 | var apiUrl = mw.getApiProviderURL( embedPlayer.apiProvider ); |
389 | | - var fileTitle = 'File:' + embedPlayer.apiTitleKey.replace(/File:|Image:/, ''); |
| 389 | + var fileTitle = 'File:' + unescape( embedPlayer.apiTitleKey ).replace(/File:|Image:/, ''); |
390 | 390 | |
391 | 391 | // Get the image info |
392 | 392 | var request = { |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/skins/mw.PlayerControlBuilder.js |
— | — | @@ -116,6 +116,7 @@ |
117 | 117 | 'left' : '0px', |
118 | 118 | 'right' : '0px' |
119 | 119 | } ); |
| 120 | + |
120 | 121 | // Check for overlay controls: |
121 | 122 | if( ! _this.checkOverlayControls() ) { |
122 | 123 | // Add some space to interface for the control bar ( if not overlaying controls ) |
— | — | @@ -218,6 +219,7 @@ |
219 | 220 | // Set target width |
220 | 221 | var targetWidth = windowSize.width; |
221 | 222 | var targetHeight = targetWidth * ( embedPlayer.getHeight() / embedPlayer.getWidth() ); |
| 223 | + |
222 | 224 | // Check if it exceeds the height constraint: |
223 | 225 | if( targetHeight > windowSize.height ){ |
224 | 226 | targetHeight = windowSize.height; |
— | — | @@ -1511,7 +1513,7 @@ |
1512 | 1514 | return $j( '<div/>' ) |
1513 | 1515 | .attr( { |
1514 | 1516 | 'title' : gM( 'mwe-embedplayer-play_clip' ), |
1515 | | - 'class' : "ui-state-default play-btn-large" |
| 1517 | + 'class' : "play-btn-large" |
1516 | 1518 | } ) |
1517 | 1519 | // Get dynamic position for big play button |
1518 | 1520 | .css( { |
— | — | @@ -1519,7 +1521,7 @@ |
1520 | 1522 | 'top' : ( ( ctrlObj.embedPlayer.getPlayerHeight() - this.h ) / 2 ) |
1521 | 1523 | } ) |
1522 | 1524 | // Add play hook: |
1523 | | - .buttonHover().click( function() { |
| 1525 | + .click( function() { |
1524 | 1526 | ctrlObj.embedPlayer.play(); |
1525 | 1527 | } ); |
1526 | 1528 | } |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerNative.js |
— | — | @@ -570,7 +570,7 @@ |
571 | 571 | onprogress: function( event ) { |
572 | 572 | var e = event.originalEvent; |
573 | 573 | //mw.log("onprogress: e:" + e + ' ' + e.loaded + ' && ' + e.total ); |
574 | | - if( e.loaded && e.total ) { |
| 574 | + if( e && e.loaded && e.total ) { |
575 | 575 | this.bufferedPercent = e.loaded / e.total; |
576 | 576 | this.progressEventData = e.loaded; |
577 | 577 | } |
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerKplayer.js |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | |
73 | 73 | mw.log(" about to add the pid container"); |
74 | 74 | $j(this).html($j('<div />').attr('id', this.pid + '_container')); |
75 | | - // call swm dom loaded function: |
| 75 | + // Call swm dom loaded function: |
76 | 76 | swfobject.callDomLoadFunctions(); |
77 | 77 | // Do the flash embedding with embedSWF |
78 | 78 | swfobject.embedSWF(playerPath + "/kdp3.swf", this.pid + '_container', |
— | — | @@ -120,9 +120,9 @@ |
121 | 121 | } |
122 | 122 | |
123 | 123 | if (this.playerElement && this.playerElement.addJsListener) { |
124 | | - $j.each(bindEventMap, function(bindName, localMethod) { |
| 124 | + $j.each( bindEventMap, function( bindName, localMethod ) { |
125 | 125 | _this.bindPlayerFunction(bindName, localMethod); |
126 | | - }); |
| 126 | + } ); |
127 | 127 | // Start the monitor |
128 | 128 | this.monitor(); |
129 | 129 | } else { |
Index: branches/MwEmbedStandAlone/modules/Sequencer/tests/VideoRender.html |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | <!-- <script type="text/javascript" src="../../ResourceLoader.php?class=window.jQuery,mwEmbed&debug=true"></script> --> |
8 | 8 | <script type="text/javascript"> |
9 | 9 | mw.setConfig( 'EmbedPlayer.OverlayControls', false ); |
10 | | - mw.ready(function(){ |
| 10 | + mw.ready( function(){ |
11 | 11 | $j( "#seekInputTime" ).blur( function(){ |
12 | 12 | var smilVid = $j('#videoCrossfade').get(0); |
13 | 13 | $j('#seekInProgress').show(); |