Index: branches/js2-work/phase3/js/mwEmbed/skins/ctrlBuilder.js |
— | — | @@ -279,6 +279,14 @@ |
280 | 280 | } |
281 | 281 | this.fullscreenMode = true; |
282 | 282 | |
| 283 | + //Remove any old mw-fullscreen-overlay |
| 284 | + $interface.find( '.mw-fullscreen-overlay' ).remove(); |
| 285 | + |
| 286 | + // Special hack for mediawiki monobook skin search box |
| 287 | + if( $j( '#p-search' ).length ) { |
| 288 | + $j( '#p-search' ).css('z-index', 1); |
| 289 | + } |
| 290 | + |
283 | 291 | // Add the css fixed fullscreen black overlay as a sibling to the video element |
284 | 292 | $interface.after( |
285 | 293 | $j( '<div />' ) |
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/kplayerEmbed.js |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | params.quality = "best"; |
44 | 44 | params.wmode = "opaque"; |
45 | 45 | params.allowfullscreen = "true"; |
46 | | - params.allowscriptaccess = "sameDomain"; |
| 46 | + params.allowscriptaccess = "always"; |
47 | 47 | |
48 | 48 | var attributes = {}; |
49 | 49 | attributes.id = this.pid; |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | attributes |
69 | 69 | ); |
70 | 70 | |
71 | | - setTimeout(function() { |
| 71 | + setTimeout( function() { |
72 | 72 | _this.postEmbedJS(); |
73 | 73 | }, 250 ); |
74 | 74 | |
— | — | @@ -84,9 +84,10 @@ |
85 | 85 | if( this.playerElement && this.playerElement.addJsListener ) { |
86 | 86 | // Add KDP listeners |
87 | 87 | _this.bindPlayerFunction( 'doPause', 'onPause' ); |
88 | | - _this.bindPlayerFunction( 'doPlay', 'play' ); |
| 88 | + _this.bindPlayerFunction( 'doPlay', 'onPlay' ); |
89 | 89 | _this.bindPlayerFunction( 'playerPlayEnd', 'onClipDone' ); |
90 | | - _this.bindPlayerFunction( 'playerUpdatePlayhead', 'onUpdatePlayhead' ); |
| 90 | + _this.bindPlayerFunction( 'playerUpdatePlayhead', 'onUpdatePlayhead' ); |
| 91 | + |
91 | 92 | // Start the monitor |
92 | 93 | this.monitor(); |
93 | 94 | }else{ |
— | — | @@ -106,7 +107,7 @@ |
107 | 108 | * @param {String} flash binding name |
108 | 109 | * @param {String} function callback name |
109 | 110 | */ |
110 | | - bindPlayerFunction:function( bName, fName ) { |
| 111 | + bindPlayerFunction: function( bName, fName ) { |
111 | 112 | var cbid = fName + '_cb_' + this.id.replace(' ', '_'); |
112 | 113 | eval( 'window[ \'' + cbid +'\' ] = function( data ) {$j(\'#' + this.id + '\').get(0).'+ fName +'( data );}' ); |
113 | 114 | this.playerElement.addJsListener( bName , cbid); |
— | — | @@ -116,15 +117,23 @@ |
117 | 118 | * on Pause callback from the kaltura flash player |
118 | 119 | * calls parent_pause to update the interface |
119 | 120 | */ |
120 | | - onPause:function() { |
| 121 | + onPause: function() { |
121 | 122 | this.parent_pause(); |
122 | 123 | }, |
123 | 124 | |
124 | 125 | /** |
| 126 | + * onPlay function callback from the kaltura flash player |
| 127 | + * directly call the parent_play |
| 128 | + */ |
| 129 | + onPlay: function(){ |
| 130 | + this.parent_play(); |
| 131 | + }, |
| 132 | + |
| 133 | + /** |
125 | 134 | * play method |
126 | 135 | * calls parent_play to update the interface |
127 | 136 | */ |
128 | | - play:function() { |
| 137 | + play: function() { |
129 | 138 | if( this.playerElement && this.playerElement.sendNotification ) |
130 | 139 | this.playerElement.sendNotification( 'doPlay' ); |
131 | 140 | this.parent_play(); |
— | — | @@ -134,8 +143,10 @@ |
135 | 144 | * pause method |
136 | 145 | * calls parent_pause to update the interface |
137 | 146 | */ |
138 | | - pause:function() { |
139 | | - this.playerElement.sendNotification('doPause'); |
| 147 | + pause: function() { |
| 148 | + if( this.playerElement && this.playerElement.sendNotification ){ |
| 149 | + this.playerElement.sendNotification('doPause'); |
| 150 | + } |
140 | 151 | this.parent_pause(); |
141 | 152 | }, |
142 | 153 | |
— | — | @@ -158,9 +169,10 @@ |
159 | 170 | /** |
160 | 171 | * Issues a volume update to the playerElement |
161 | 172 | */ |
162 | | - updateVolumen:function( percentage ) { |
163 | | - if( this.playerElement && this.playerElement.sendNotification ) |
164 | | - this.playerElement.sendNotification('volumeChange', percentage); |
| 173 | + updateVolumen: function( percentage ) { |
| 174 | + if( this.playerElement && this.playerElement.sendNotification ){ |
| 175 | + this.playerElement.sendNotification('changeVolume', percentage); |
| 176 | + } |
165 | 177 | }, |
166 | 178 | |
167 | 179 | /** |
Index: branches/js2-work/phase3/js/mwEmbed/modules/ApiProxy/mw.ApiProxy.js |
— | — | @@ -63,7 +63,6 @@ |
64 | 64 | * @param {Function} [callbackTimeout] Optional Function called on api timeout |
65 | 65 | */ |
66 | 66 | $.doRequest = function( apiUrl, requestQuery, callback , callbackTimeout ) { |
67 | | - |
68 | 67 | // Sanity check: |
69 | 68 | if ( mw.isLocalDomain( apiUrl ) ) { |
70 | 69 | mw.log( "Error: trying to proxy local domain? " ); |
— | — | @@ -417,7 +416,7 @@ |
418 | 417 | * @param {URL} apiUrl The url of the api server |
419 | 418 | */ |
420 | 419 | // Include gadget js ( in case the user has not enabled the gadget on that domain ) |
421 | | - var gadgetWithJS = '?withJS=MediaWiki:Gadget-mwEmbed.js'; |
| 420 | + var gadgetWithJS = '?withJS=MediaWiki:MwEmbed.js'; |
422 | 421 | //var gadgetWithJS = ''; |
423 | 422 | function getServerFrame( context ) { |
424 | 423 | if( ! context || ! context.apiUrl ){ |
— | — | @@ -602,9 +601,9 @@ |
603 | 602 | */ |
604 | 603 | function serverHandleRequest( ) { |
605 | 604 | var clientRequest = getClientRequest(); |
606 | | - mw.log(" Handle client request :: " + JSON.stringify( clientRequest ) ); |
| 605 | + mw.log(" Handle client request :: " + JSON.stringify( clientRequest ) ); |
607 | 606 | // Process request type: |
608 | | - switch( clientRequest[ 'action' ] ){ |
| 607 | + switch( clientRequest[ 'action' ] ){ |
609 | 608 | case 'browseFile': |
610 | 609 | return serverBrowseFile(); |
611 | 610 | break; |
— | — | @@ -788,7 +787,7 @@ |
789 | 788 | |
790 | 789 | // Api proxy does not handle descriptionText rewrite |
791 | 790 | 'rewriteDescriptionText' : false, |
792 | | - |
| 791 | + |
793 | 792 | // Don't show firefogg upload warning |
794 | 793 | 'showFoggWarningFlag' : false, |
795 | 794 | |
— | — | @@ -938,7 +937,7 @@ |
939 | 938 | |
940 | 939 | // Special handler for src and packaged hash request: |
941 | 940 | if( options.src ) { |
942 | | - s += 'src="' + options.src; |
| 941 | + s += 'src="' + mw.escapeQuotes( options.src ); |
943 | 942 | if( options.request ) { |
944 | 943 | |
945 | 944 | // Add the contextKey to the request |
Index: branches/js2-work/phase3/js/mwEmbed/remotes/mediaWiki.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | */ |
6 | 6 | var urlparts = getRemoteEmbedPath(); |
7 | 7 | var mwEmbedHostPath = urlparts[0]; |
8 | | -var mwRemoteVersion = 'r105'; |
| 8 | +var mwRemoteVersion = 'r106'; |
9 | 9 | |
10 | 10 | // Log the mwRemote version ( will determine what version of js we get ) |
11 | 11 | if( window.console ){ |
Index: branches/js2-work/phase3/js/apiProxyPage.js |
— | — | @@ -29,6 +29,7 @@ |
30 | 30 | |
31 | 31 | // Do a setTimeout to 0 to call after other zero delay async events |
32 | 32 | // ( once everyone is doing buildout withthin mwsetup priror to .ready this won't be needed. ) |
| 33 | + mw.log( 'load ApiProxy' ); |
33 | 34 | mw.load( 'ApiProxy', function(){ |
34 | 35 | //Clear out the page content ( not needed for iframe proxy ) |
35 | 36 | $j( 'body' ).html( '' ); |