<commit_before>( function( mw, $ ) {

mw.PlaylistHandlerKaltura = function( playlist, options ){
	return this.init( playlist, options );
};

// For players playlist that don't have layout information
mw.setConfig('KalturaSupport.PlaylistDefaultItemRenderer', '<hbox id="irCont" height="100%" width="100%" x="10" y="10" verticalalign="top" stylename="Button_upSkin_default"> <img id="irImageIrScreen" url="{this.thumbnailUrl}" source="{this.thumbnailUrl}" height="48" width="72"> <vbox height="100%" width="100%" id="labelsHolder" verticalgap="0"> <hbox id="nameAndDuration" width="100%" height="18"> <label id="irLinkIrScreen" height="18" width="100%" text="{this.name}" stylename="itemRendererLabel" label="{this.name}" prefix="" font="Arial"></label> <label id="irDurationIrScreen" height="18" width="70" text="{formatDate(this.duration, \'NN:SS\')}" stylename="itemRendererLabel" prefix="" font="Arial"></label> </hbox> <label id="irDescriptionIrScreen" width="240" height="18" text="{this.description}" stylename="itemRendererLabel" prefix="" font="Arial"></label> </vbox> </hbox>');

mw.PlaylistHandlerKaltura.prototype = {
		
	clipList:null,
	
	uiconf_id: null,
	widget_id: null,
	playlist_id: null,
	mrssHandler: null,
	
	playlistSet : [],
	
	// ui conf data
	uiConfData : null,
	includeInLayout: true,
	
	init: function ( playlist, options ){
		this.playlist = playlist;
		// set all the options: 
		for( var i in options){
			this[i] = options[i];
		}
	},
	
	loadPlaylist: function ( callback ){
		var _this = this;
		mw.log( "mw.PlaylistHandlerKaltura:: loadPlaylist > ");
		// Get the kaltura client:
		this.getKClient().playerLoader({
			'uiconf_id' : this.uiconf_id
		}, function( playerData ){
			mw.log("PlaylistHandlerKaltura:: loadPlaylist: got playerData" );
			
			_this.playlistSet = [];
			// @@TODO clean up with getConf option
			// Add in flashvars playlist id if present:
			if( _this.playlist_id !== null ){
				_this.playlistSet.push({
					'playlist_id' : _this.playlist_id 
				});
			}
			
			// Add all playlists to playlistSet
			var $uiConf = $j( playerData.uiConf );
			
			// load the playlist config: 
			var plApi = kWidgetSupport.getPluginConfig(
					_this.flashvars,
					$uiConf, 
					'playlistAPI', 
					['autoContinue', 'autoPlay']
			);
			
			var plConf =  kWidgetSupport.getPluginConfig(
					_this.flashvars,
					$uiConf, 
					'playlist', 
					[ 'includeInLayout' ]
			);

			// Check for autoContinue 
			_this.autoContinue = plApi.autoContinue;
			
			_this.autoPlay = plApi.autoPlay;
			if( plConf.includeInLayout === false ){
				_this.includeInLayout = false;
			} else {
				_this.videolistWidth = 250;
			}

			// Store all the playlist item render information:
			_this.$playlistItemRenderer = $uiConf.find('#playlistItemRenderer');
			if( _this.$playlistItemRenderer.children().length == 0  ){
				// No layout info use default
				_this.$playlistItemRenderer = $j( mw.getConfig('KalturaSupport.PlaylistDefaultItemRenderer') );
			}
			<commit_msg>fixed config for videoList width<commit_after>( function( mw, $ ) {

mw.PlaylistHandlerKaltura = function( playlist, options ){
	return this.init( playlist, options );
};

// For players playlist that don't have layout information
mw.setConfig('KalturaSupport.PlaylistDefaultItemRenderer', '<hbox id="irCont" height="100%" width="100%" x="10" y="10" verticalalign="top" stylename="Button_upSkin_default"> <img id="irImageIrScreen" url="{this.thumbnailUrl}" source="{this.thumbnailUrl}" height="48" width="72"> <vbox height="100%" width="100%" id="labelsHolder" verticalgap="0"> <hbox id="nameAndDuration" width="100%" height="18"> <label id="irLinkIrScreen" height="18" width="100%" text="{this.name}" stylename="itemRendererLabel" label="{this.name}" prefix="" font="Arial"></label> <label id="irDurationIrScreen" height="18" width="70" text="{formatDate(this.duration, \'NN:SS\')}" stylename="itemRendererLabel" prefix="" font="Arial"></label> </hbox> <label id="irDescriptionIrScreen" width="240" height="18" text="{this.description}" stylename="itemRendererLabel" prefix="" font="Arial"></label> </vbox> </hbox>');

mw.PlaylistHandlerKaltura.prototype = {
		
	clipList:null,
	
	uiconf_id: null,
	widget_id: null,
	playlist_id: null,
	mrssHandler: null,
	
	playlistSet : [],
	
	// ui conf data
	uiConfData : null,
	includeInLayout: true,
	
	init: function ( playlist, options ){
		this.playlist = playlist;
		// set all the options: 
		for( var i in options){
			this[i] = options[i];
		}
	},
	
	loadPlaylist: function ( callback ){
		var _this = this;
		mw.log( "mw.PlaylistHandlerKaltura:: loadPlaylist > ");
		// Get the kaltura client:
		this.getKClient().playerLoader({
			'uiconf_id' : this.uiconf_id
		}, function( playerData ){
			mw.log("PlaylistHandlerKaltura:: loadPlaylist: got playerData" );
			
			_this.playlistSet = [];
			// @@TODO clean up with getConf option
			// Add in flashvars playlist id if present:
			if( _this.playlist_id !== null ){
				_this.playlistSet.push({
					'playlist_id' : _this.playlist_id 
				});
			}
			
			// Add all playlists to playlistSet
			var $uiConf = $j( playerData.uiConf );
			
			// load the playlist config: 
			var plApi = kWidgetSupport.getPluginConfig(
					_this.flashvars,
					$uiConf, 
					'playlistAPI', 
					['autoContinue', 'autoPlay']
			);
			
			var plConf =  kWidgetSupport.getPluginConfig(
					_this.flashvars,
					$uiConf, 
					'playlist', 
					[ 'includeInLayout', 'width', 'height' ]
			);

			// Check for autoContinue 
			_this.autoContinue = plApi.autoContinue;
			// Set autoPlay
			_this.autoPlay = plApi.autoPlay;
			
			// Set width:
			_this.videolistWidth = ( plConf.width )?  plConf.width : $uiConf.find('#playlist').attr('width');
			// Set height:
			_this.videolistHeight = ( plConf.height )?  plConf.height : $uiConf.find('#playlist').attr('height');
			 
			if( plConf.includeInLayout === false ){
				_this.includeInLayout = false;
			} else if( parseInt( _this.videolistWidth ) == 0 ){
				_this.videolistWidth  = 250;
			}

			// Store all the playlist item render information:
			_this.$playlistItemRenderer = $uiConf.find('#playlistItemRenderer');
			if( _this.$playlistItemRenderer.children().length == 0  ){
				// No layout info use default
				_this.$playlistItemRenderer = $j( mw.getConfig('KalturaSupport.PlaylistDefaultItemRenderer') );
			}
			
{'fraction_non_alphanumeric': 0.1534956794972506, 'fraction_numerical': 0.013982717989002356, 'mean_word_length': 4.142164781906301, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '670887', 'n_tokens_mistral': 2500, 'n_tokens_neox': 2081, 'n_words': 448}