Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy vp2k #103

Merged
merged 10 commits into from May 4, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/DefaultSettings.php
Expand Up @@ -19,7 +19,7 @@
);

// The version of the library
$wgMwEmbedVersion = '1.6.12alpha';
$wgMwEmbedVersion = '1.6.11.12';

// Url to the resource loader php script:
$wgResourceLoaderUrl = $wgMwEmbedPathUrl . 'ResourceLoader.php';
Expand Down
2 changes: 1 addition & 1 deletion kWidget.js
Expand Up @@ -214,7 +214,6 @@ var kWidget = {
this.outputDirectDownload( targetId, settings );
return ;
}

if( settings.isHTML5 ){
this.outputHTML5Iframe( targetId, settings );
} else {
Expand Down Expand Up @@ -618,6 +617,7 @@ var kWidget = {
}
_this.appendScriptUrl( baseUiConfJsUrl + _this.embedSettingsToUrl( settings ), function(){
_this.uiConfScriptLoadList[ settings.uiconf_id ] = true;
// see if this the last uiConf missing conf js
if( ! _this.isMissingUiConfJs( playerList ) ){
callback();
} else {
Expand Down
11 changes: 9 additions & 2 deletions modules/FreeWheel/mw.FreeWheelController.js
Expand Up @@ -122,6 +122,9 @@ mw.FreeWheelController.prototype = {

// Load add data ( will call onRequestComplete once ready )
mw.log( "FreeWheelController::submitRequest>" );
// set the inSequence flag while loading ads:
_this.embedPlayer.sequenceProxy.isInSequence = true;

// Get Freewheel ads:
_this.getContext().submitRequest();
// set the callback
Expand Down Expand Up @@ -297,7 +300,6 @@ mw.FreeWheelController.prototype = {
slot.donePlaying = false;

mw.log( 'mw.FreeWheelController:: playSlot:' + this.getSlotType( slot ) + ' adInstances: ' + slot._adInstances.length );

// if no ad slots are available return
if( slot._adInstances.length == 0 ){
return false;
Expand All @@ -311,8 +313,12 @@ mw.FreeWheelController.prototype = {
// Update the ad duration ( may change once the media is loaded )
_this.embedPlayer.adTimeline.updateSequenceProxy( 'duration', adMetaData.duration );

// Update the player ad playback mode:
_this.embedPlayer.adTimeline.updateUiForAdPlayback( _this.getSlotType( slot ) );

// Play the slot
slot.play();

// Update the active slot
this.activeSlot = slot;
// Monitor ad progress ( for sequence proxy )
Expand Down Expand Up @@ -369,7 +375,8 @@ mw.FreeWheelController.prototype = {
'height': _this.orginalInterfaceHeight,
'bottom' : 0,
'top' : 0,
})
'left': 0
});

// remove pause binding:
var vid = this.embedPlayer.getPlayerElement();
Expand Down
1 change: 0 additions & 1 deletion modules/KalturaSupport/mw.KDPMapping.js
Expand Up @@ -760,7 +760,6 @@
callback( { 'timeSlot': slotType }, embedPlayer.id );
});
break;
break;
case 'preSequenceComplete':
b('AdSupport_preSequenceComplete', function( e, slotType ){
callback( { 'timeSlot': slotType }, embedPlayer.id );
Expand Down
2 changes: 1 addition & 1 deletion modules/KalturaSupport/mw.KTimedText.js
Expand Up @@ -53,7 +53,7 @@
} else if( _this.getConfig( 'hideClosedCaptions' ) == true ){
embedPlayer.timedText.setLayoutMode( 'off' );
}
// Bind player:
// Bind player at player ready time
_this.bindPlayer( embedPlayer );
callback();
},
Expand Down
247 changes: 247 additions & 0 deletions modules/KalturaSupport/tests/kWidget.embed.emptyPlayer.qunit.html

Large diffs are not rendered by default.

45 changes: 23 additions & 22 deletions modules/TimedText/mw.TextSource.js
Expand Up @@ -225,7 +225,6 @@
});

$( xml ).find( 'p' ).each( function( inx, p ){

// Get text content by converting ttml node to html
var content = '';
$.each( p.childNodes, function(inx, node){
Expand Down Expand Up @@ -290,6 +289,19 @@
},
convertTTML2HTML: function( node ){
var _this = this;

// look for text node:
if( node.nodeType == 3 ){
return node.textContent;
}
// skip metadata nodes:
if( node.nodeName == 'metadata' ){
return '';
}
// if a br just append
if( node.nodeName == 'br' ){
return '<br />';
}
// Setup tts mappings TODO should be static property of a ttmlSource object.
var ttsStyleMap = {
'tts:color' : 'color',
Expand All @@ -298,29 +310,18 @@
};
if( node.childNodes.length ){
var nodeString = '';
$.each( node.childNodes, function( inx, childNode ){
// look for text node:
if( node.nodeType == 3 ){
nodeString += node.text;
} else {
// skip metadata nodes:
if( node.nodeName == 'metadata' ){
return true;
}
var styleVal = '';
for( var attr in ttsStyleMap ){
if( node.getAttribute( attr ) ){
styleVal+= ttsStyleMap[ attr ] + ':' + node.getAttribute( attr ) + ';';
}
}
nodeString += '<' + node.nodeName + ' style="' + styleVal + '" >' +
_this.convertTTML2HTML( childNode ) +
'</' + node.nodeName + '>';
var styleVal = '';
for( var attr in ttsStyleMap ){
if( node.getAttribute( attr ) ){
styleVal+= ttsStyleMap[ attr ] + ':' + node.getAttribute( attr ) + ';';
}
} );
}
nodeString += '<' + node.nodeName + ' style="' + styleVal + '" >';
$.each( node.childNodes, function( inx, childNode ){
nodeString += _this.convertTTML2HTML( childNode );
});
nodeString += '</' + node.nodeName + '>';
return nodeString;
} else {
return node.textContent;
}
},
/**
Expand Down
30 changes: 16 additions & 14 deletions modules/TimedText/mw.TimedText.js
Expand Up @@ -394,21 +394,23 @@ mw.includeAllModuleMessages();
*/
buildMenu: function( autoShow ) {
var _this = this;
var $menuButton = this.embedPlayer.$interface.find( '.timed-text' );
var positionOpts = { };
if( this.embedPlayer.supports[ 'overlays' ] ){
var positionOpts = {
'directionV' : 'up',
'offsetY' : this.embedPlayer.controlBuilder.getHeight(),
'directionH' : 'left',
'offsetX' : -28
};
}

// Else bind and show the menu
// We already have a loader in embedPlayer so the delay of
// setupTextSources is already taken into account
// Setup text sourcesS:
_this.setupTextSources( function() {
var positionOpts = { };
if( _this.embedPlayer.supports[ 'overlays' ] ){
var positionOpts = {
'directionV' : 'up',
'offsetY' : _this.embedPlayer.controlBuilder.getHeight(),
'directionH' : 'left',
'offsetX' : -28
};
}

if( !_this.embedPlayer.$interface ){
mw.log("TimedText:: interface called before interface ready, just wait for interface");
return ;
}
var $menuButton = _this.embedPlayer.$interface.find( '.timed-text' );
// NOTE: Button target should be an option or config
$menuButton.unbind().menu( {
'content' : _this.getMainMenu(),
Expand Down