Skip to content

Commit

Permalink
merge 2.49.rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
vladm3 committed Oct 6, 2016
1 parent ebdd594 commit c5f24a3
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 35 deletions.
2 changes: 1 addition & 1 deletion includes/DefaultSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$wgBaseMwEmbedPath = realpath( dirname( __FILE__ ) . '/../' );

// The version of the library:
$wgMwEmbedVersion = '2.49.rc2';
$wgMwEmbedVersion = '2.49.rc3';

// Default HTTP protocol from GET or SERVER parameters
if( isset($_GET['protocol']) ) {
Expand Down
54 changes: 31 additions & 23 deletions modules/Chromecast/resources/chromecast.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'uiconfid':null,
'defaultConfig':true,
'disableSenderUI':false,
'defaultThumbnail': ''
'defaultThumbnail': null

},
isDisabled: false,
Expand Down Expand Up @@ -141,9 +141,9 @@
'entryId': _this.embedPlayer.kentryid
}
};
var proxyData = _this.embedPlayer.getKalturaConfig("proxyData");
if (proxyData && proxyData.data){
changeMediaMsg.data.proxyData = proxyData.data;
var proxyData = _this.getProxyData();
if (proxyData){
changeMediaMsg.data.proxyData = proxyData;
}
_this.sendMessage(changeMediaMsg);
_this.savedPosition = 0;
Expand Down Expand Up @@ -383,8 +383,30 @@
}
} );
// add support for custom proxyData for OTT app developers
var proxyData = this.getProxyData();
if(proxyData){
fv['proxyData'] = proxyData;
}

// add support for passing ks
if ( this.embedPlayer.getFlashvars( "ks" ) ) {
fv["ks"] = this.embedPlayer.getFlashvars( "ks" );
}
if (this.getConfig('defaultConfig')) {
fv['controlBarContainer'] = {hover: true};
fv['volumeControl'] = {plugin: false};
fv['titleLabel'] = {plugin: true};
fv['fullScreenBtn'] = {plugin: false};
fv['scrubber'] = {plugin: true};
fv['largePlayBtn'] = {plugin: true};
}
return fv;
},

getProxyData: function(){
var proxyData = this.getConfig( 'proxyData' );
if ( proxyData ) {
var _this = this;
var recursiveIteration = function ( object ) {
for ( var property in object ) {
if ( object.hasOwnProperty( property ) ) {
Expand All @@ -395,29 +417,15 @@
}
}
}
}
};
recursiveIteration( proxyData );
fv['proxyData'] = proxyData;
return proxyData;
} else {
var data = _this.embedPlayer.getKalturaConfig('originalProxyData');
var data = this.embedPlayer.getKalturaConfig('originalProxyData');
if (!$.isEmptyObject(data)) {
fv['proxyData'] = data;
return data;
}
}

// add support for passing ks
if ( this.embedPlayer.getFlashvars( "ks" ) ) {
fv["ks"] = this.embedPlayer.getFlashvars( "ks" );
}
if (this.getConfig('defaultConfig')) {
fv['controlBarContainer'] = {hover: true};
fv['volumeControl'] = {plugin: false};
fv['titleLabel'] = {plugin: true};
fv['fullScreenBtn'] = {plugin: false};
fv['scrubber'] = {plugin: true};
fv['largePlayBtn'] = {plugin: true};
}
return fv;
},

onLaunchError: function(error) {
Expand Down Expand Up @@ -881,7 +889,7 @@
},

getPlayingScreen: function(){
var thumbnail = this.getConfig('defaultThumbnail') !== "" ? this.getConfig('defaultThumbnail') : this.embedPlayer.poster;
var thumbnail = (this.getConfig('defaultThumbnail') !== null) ? this.getConfig('defaultThumbnail') : this.embedPlayer.poster;
return '<div class="chromecastScreen" style="background-color: rgba(0,0,0,0.7); width: 100%; height: 100%; font-family: Arial; position: absolute">' +
'<div class="chromecastPlayback">' +
'<div class="chromecastThumbBorder">' +
Expand Down
10 changes: 5 additions & 5 deletions modules/Hlsjs/resources/hls.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/Hlsjs/resources/hlsjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use strict";

//Currently use native support when available, e.g. Safari desktop
if (Hls.isSupported() && !mw.isDesktopSafari() && !mw.getConfig("disableHLSOnJs")) {
if (Hls.isSupported() && !mw.isNativeApp() && !mw.isDesktopSafari() && !mw.getConfig("disableHLSOnJs")) {
var orig_supportsFlash = mw.supportsFlash.bind(mw);
mw.supportsFlash = function () {
return false;
Expand Down
4 changes: 3 additions & 1 deletion modules/KalturaSupport/UiConfResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ public function parseJSON( $uiConf ) {
//"playersJsReceiver" => array()
);

if(preg_match('/(?i)msie [5-8]/',$_SERVER['HTTP_USER_AGENT']))
$userAgent = $this->request->getUserAgent();

if(preg_match('/(?i)msie [5-8]/', $userAgent))
{
//On IE8 and below disable hlsjs if added
if (isset($playerConfig['plugins']) &&
Expand Down
2 changes: 2 additions & 0 deletions modules/KalturaSupport/resources/mw.KDPMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,8 @@
// Update the proxy data
embedPlayer.setKalturaConfig("proxyData", notificationData.proxyData);
embedPlayer.setKalturaConfig("proxyData", "data", notificationData.proxyData);
//Needed for changeMedia to keep base proxyData before server response is mixed into the object
embedPlayer.setKalturaConfig('originalProxyData', notificationData.proxyData);

// Clear player & entry meta
embedPlayer.kalturaPlayerMetaData = null;
Expand Down
12 changes: 8 additions & 4 deletions resources/jquery.ui/jquery.ui.slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,19 @@ $.widget( "ui.slider", $.ui.mouse, {
}

var outerWidth = this.element.outerWidth();
//IE11 iframe fullscreen fix (KMS-4606)
if( !mw.getConfig('EmbedPlayer.IsFriendlyIframe') && window["resizeScrubberIE11"] === true ){
outerWidth = $(window).width();
var elemOffset = this.element.offset();
//IE11 iframe fullscreen fix (KMS-4606)
if( !mw.getConfig('EmbedPlayer.IsFriendlyIframe') && window["resizeScrubberIE11"] === true ) {
outerWidth = this.element.get(0).clientWidth;
var ieOffsetTop = elemOffset.top * 100;
var ieOffsetLeft = elemOffset.left * 100;
elemOffset = {left: ieOffsetLeft, top: ieOffsetTop};
}
this.elementSize = {
width: outerWidth,
height: this.element.outerHeight()
};
this.elementOffset = this.element.offset();
this.elementOffset = elemOffset;

position = { x: event.pageX, y: event.pageY };
normValue = this._normValueFromMouse( position );
Expand Down

0 comments on commit c5f24a3

Please sign in to comment.