Skip to content

Commit

Permalink
added some legacy plugin support functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Dale committed Aug 15, 2012
1 parent 0bf8d94 commit 0ce1fea
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
8 changes: 7 additions & 1 deletion modules/EmbedPlayer/resources/mw.processEmbedPlayers.js
Expand Up @@ -89,7 +89,13 @@ mw.processEmbedPlayers = function( playerSelect, callback ) {

// Allow plugins to add bindings to the inDomPlayer
$( mw ).trigger ( 'EmbedPlayerNewPlayer', inDomPlayer );


// Also trigger legacy newEmbedPlayerEvent event
if( $( mw ).data('events') && $( mw ).data('events')['newEmbedPlayerEvent'] ){
mw.log("processEmbedPlayers:: Warning, newEmbedPlayerEvent is deprecated, please use EmbedPlayerNewPlayer");
$( mw ).trigger( 'newEmbedPlayerEvent', inDomPlayer );
}

// Add a player ready binding:
$( inDomPlayer ).bind( 'playerReady', areSelectedPlayersReady );

Expand Down
6 changes: 3 additions & 3 deletions modules/KalturaSupport/KalturaPlaylistResult.php
Expand Up @@ -153,9 +153,9 @@ function getFirstPlaylistId(){
if( is_array( $plParsed ) && isset( $plParsed['query'] ) ){
$args = explode("&", $plParsed['query'] );
foreach( $args as $inx => $argSet ){
list( $key, $val ) = explode('=', $argSet );
if( $key == 'playlist_id' ){
$playlistId = $val;
$argParts = explode('=', $argSet );
if( $argParts[0] == 'playlist_id' && isset( $argParts[1] )){
$playlistId = $argParts[1];
}
}
}
Expand Down
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>AccessControl Playlist Block Mobile First Entry test</title>
<title>AccessControl Playlist Block iOS on First Entry test</title>
<script type="text/javascript" src="../../../tests/qunit/qunit-bootstrap.js"></script>
<script type="text/javascript" src="../../../mwEmbedLoader.php?debug=true"></script>
<script type="text/javascript">
Expand Down
1 change: 0 additions & 1 deletion modules/KalturaSupport/tests/PS/HBP/hbpAudio.js
Expand Up @@ -148,6 +148,5 @@
} );
return $lastButton;
}

}
})( window.mw, jQuery );
7 changes: 6 additions & 1 deletion modules/MwEmbedSupport/mw.MwEmbedSupport.js
Expand Up @@ -65,7 +65,12 @@
window.gM = function(){
return mw.msg.apply(this, $.makeArray( arguments ) );
};

/**
* Aliased manual message adding
*/
mw.addMessages = function( msgOb ){
mw.messages.set( msgOb );
}
mw.setConfig = function( name, value ){
mediaWiki.config.set( name, value );
};
Expand Down
2 changes: 1 addition & 1 deletion modules/Omniture/Omniture.loader.js
@@ -1,6 +1,6 @@
( function( mw, $ ) { "use strict";

$( mw ).bind( 'newEmbedPlayerEvent', function( event, embedPlayer ){
$( mw ).bind( 'EmbedPlayerNewPlayer', function( event, embedPlayer ){
$( embedPlayer ).bind( 'KalturaSupport_CheckUiConf', function( event, $uiConf, callback ){
var pluginName = null;
pluginName = embedPlayer.isPluginEnabled( 'omniture' ) ? 'omniture' : null;
Expand Down

0 comments on commit 0ce1fea

Please sign in to comment.