<commit_before>mw.PlaylistHandlerKaltura = function( playlist, options ){
	return this.init( playlist, options );
};
// for players 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: false,
	
	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;
		
		// 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 );
			
			// Check for autoContinue ( we check false state so that by default we autoContinue ) 
			var $ac = $uiConf.find("uivars [key='playlistAPI.autoContinue']");
			_this.autoContinue = ( $ac.length && $ac.get(0).getAttribute('value') == 'false' )? false: true;
			
			// Check for flash var override: 
			if( _this.flashvars['playlistAPI.autoContinue'] == 'true' ){
				_this.autoContinue = true;
			}
			
			var $ap = $uiConf.find("uivars [key='playlistAPI.autoPlay']");
			_this.autoPlay = ( $ap.length && $ap.get(0).getAttribute('value') == 'false' )? false: true;
			// Check for flash var override: 
			if( _this.flashvars['playlistAPI.autoPlay'] == 'true' ){
				_this.autoPlay = true;
			}
			
			var $il = $uiConf.find("uivars [key='playlist.includeInLayout']");
			_this.includeInLayout = ( $il.length && $il.get(0).getAttribute('value') == 'false' )? false : true;
			
			if( $uiConf.find('#playlist').get(0) ){
				// Check for videolist width
				_this.videolistWidth = $uiConf.find('#playlist').get(0).getAttribute('width');
			} 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<commit_msg>added support for setting playlist width to 0 to hide playlist. <commit_after>mw.PlaylistHandlerKaltura = function( playlist, options ){
	return this.init( playlist, options );
};
// for players 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: false,
	
	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;
		
		// 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 );
			
			// Check for autoContinue ( we check false state so that by default we autoContinue ) 
			var $ac = $uiConf.find("uivars [key='playlistAPI.autoContinue']");
			_this.autoContinue = ( $ac.length && $ac.get(0).getAttribute('value') == 'false' )? false: true;
			
			// Check for flash var override: 
			if( _this.flashvars['playlistAPI.autoContinue'] == 'true' ){
				_this.autoContinue = true;
			}
			
			var $ap = $uiConf.find("uivars [key='playlistAPI.autoPlay']");
			_this.autoPlay = ( $ap.length && $ap.get(0).getAttribute('value') == 'false' )? false: true;
			// Check for flash var override: 
			if( _this.flashvars['playlistAPI.autoPlay'] == 'true' ){
				_this.autoPlay = true;
			}
			
			var $il = $uiConf.find("uivars [key='playlist.includeInLayout']");
			_this.includeInLayout = ( $il.length && $il.get(0).getAttribute('value') == 'false' )? false : true;
			
			if( $uiConf.find('#playlist').get(0) ){
				// Check for videolist width
				_this.videolistWidth = $uiConf.find('#playlist').get(0).getAttribute('width');
				if( parseInt( _this.videolistWidth ) == 0 ){
					_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
{'fraction_non_alphanumeric': 0.16691090269636577, 'fraction_numerical': 0.014654161781946073, 'mean_word_length': 4.303030303030303, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '4734559', 'n_tokens_mistral': 2628, 'n_tokens_neox': 2242, 'n_words': 500}