<commit_before><!DOCTYPE HTML>
<html>
<head>
<title>Thumbnail Player test</title>
<script type="text/javascript" src="../../../tests/qunit/qunit-bootstrap.js"></script>
<script type="text/javascript" src="../../../mwEmbedLoader.php"></script>
<script type="text/javascript">	

window['allreadyRan'] = false;
function jsKalturaPlayerTest( videoId ){
	
}

</script>
<!-- qunit-kaltura must come after qunit-bootstrap.js and after mwEmbedLoader.php and after any jsCallbackReady stuff-->
<script type="text/javascript" src="resources/qunit-kaltura-bootstrap.js"></script>
</head>
<body>
<h2> Thumbnail Player test </h2>
<a href="?forceMobileHTML5"> Force Mobile HTML5</a> for testing with desktop chrome and safari.
<br />
<div id="score"></div>
<div id="myVideoContainer" style="position:relative">

</div>
<script>
	/* configuration */
	var numOfPlayer = 100;
	var useThumbEmbed = true;
	var possibleEntries = [ '0_486jji2g', '0_k4dkai5u', '0_yxm3pstm', '1_n1nv959k',
	                        '0_c0r624gh', '0_c0r624gh', '1_v1z55w0b', '0_uka1msg4' ];
	
	// flag to keep track of when all the players are "ready"
	var playersReady = 0
	startClock();
	for( var i=0; i < numOfPlayer; i++){
		// wrap in local closure to keep local ready callback 
		( function( playerInx ){
			var playerId = 'player_' + playerInx ;
			
			// Add a trget div:
			$( '#myVideoContainer' ).append( 
					$('<div />')
						.attr('id', playerId)
						.css({
							'width': 320,
							'height': 240,
							'float':'left',
							'position': 'relative',
							'padding-right': 10,
						})
			)
			var entryId = possibleEntries[ Math.floor(Math.random()*possibleEntries.length) ]
			var kWidgetEmbedSettings = {
				'targetId': playerId,
				'wid': '_243342',
				'uiconf_id' : '2877502',
				'entry_id' : entryId,
				'flashvars':{
					'externalInterfaceDisabled' : false,
				},
				'readyCallback': function( playerId ){
					console.log("player " + playerId + " ready for binding");
					var kdp = document.getElementById( playerId )
					kdp.kBind('mediaReady', function(){
						playersReady++;<commit_msg>include a few more options in the thumbnail test<commit_after><!DOCTYPE HTML>
<html>
<head>
<title>Thumbnail Player test</title>
<script type="text/javascript" src="../../../tests/qunit/qunit-bootstrap.js"></script>
<script type="text/javascript" src="../../../mwEmbedLoader.php"></script>
<script type="text/javascript">	

window['allreadyRan'] = false;
function jsKalturaPlayerTest( videoId ){
	
}

</script>
<!-- qunit-kaltura must come after qunit-bootstrap.js and after mwEmbedLoader.php and after any jsCallbackReady stuff-->
<script type="text/javascript" src="resources/qunit-kaltura-bootstrap.js"></script>
</head>
<body>
<h2> Thumbnail Player test </h2>
Default:( Thumb embed ) <br>
<a href="?forceMobileHTML5"> Force Mobile HTML5 ( thumbs )</a> <br>

<a href="?forceNoThumbFlash"> Force No thumbs Flash </a>.<br>
<a href="?forceNoThumbHTML5"> Force No thumbs HTML5 </a>.<br>
<br />
<div id="score"></div>
<div id="myVideoContainer" style="position:relative">

</div>
<script>
	/* configuration */
	var numOfPlayer = 20;
	var useThumbEmbed = true;
	if( document.URL.indexOf( 'forceNoThumbFlash') != -1){
		useThumbEmbed = false;
	}
	if( document.URL.indexOf( '?forceNoThumbHTML5') != -1){
		useThumbEmbed = false;
		mw.setConfig('forceMobileHTML5', true);
	}
	var possibleEntries = [ '0_486jji2g', '0_k4dkai5u', '0_yxm3pstm', '1_n1nv959k',
	                        '0_c0r624gh', '0_c0r624gh', '1_v1z55w0b', '0_uka1msg4' ];
	
	// flag to keep track of when all the players are "ready"
	var playersReady = 0
	startClock();
	for( var i=0; i < numOfPlayer; i++){
		// wrap in local closure to keep local ready callback 
		( function( playerInx ){
			var playerId = 'player_' + playerInx ;
			
			// Add a trget div:
			$( '#myVideoContainer' ).append( 
					$('<div />')
						.attr('id', playerId)
						.css({
							'width': 320,
							'height': 240,
							'float':'left',
							'position': 'relative',
							'padding-right': 10,
							'padding-bottom': 10
						})
			)
			var entryId = possibleEntries[ Math.floor(Math.random()*possibleEntries.length) ]
			var kWidgetEmbedSettings = {
				'targetId': playerId,
				'wid': '_243342',
				'uiconf_id' : '2877502',
				'entry_id' : entryId,
				'flashvars':{
					'externalInterfaceDisabled' : false,
				},
				'readyCallback': function( playerId ){
					console.log("player " + playerId + " ready for binding");
					var kdp = document.getElementById( playerId )
					kdp.kBind('mediaReady', function(){
						playersReady++;
{'fraction_non_alphanumeric': 0.16713942832205977, 'fraction_numerical': 0.02902029238490072, 'mean_word_length': 3.6116700201207244, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 65, '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': '3872126', 'n_tokens_mistral': 1880, 'n_tokens_neox': 1551, 'n_words': 373}