<commit_before><html>
  <head>
    <meta name="generator" content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org">
	
    <title></title>
  </head>
  <body>
    <div style="width:680">
    <div class="playerContainer" style="float:left;width:480px;height:290px;top:0px;left:0px;position:absolute;">
		<video class="persistentNativePlayer" id="vid1" width="480" height="300"
		 poster="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb480.jpg"
		 durationHint="33"
		 >
		 	<source src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb_trailer_iphone.m4v" />
			<source src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb400p.ogv" />
		</video>
	</div>
		<div id="companionTarget" style="float:right;width:180px;height:267px;border:solid thin black">
			Companion target
		</div>
	</div>
	<div style="clear:both"></div>
	    <h1>
      HTML5 ad timeline test
    </h1>
   	<br>Preroll video (5 seconds kaltura) <input id="preroll" type="text" size="40" value="http://cdnbakmi.kaltura.com/p/423851/sp/42385100/serveFlavor/flavorId/1_3ulztti8/name/1_3ulztti8.mp4"></input>
   	<a id="addPreroll" href="#">Update preroll video</a>
    </br>
    <br>Postroll video (5 seconds kaltura) <input id="postroll" type="text" size="40" value="http://cdnbakmi.kaltura.com/p/423851/sp/42385100/serveFlavor/flavorId/1_3ulztti8/name/1_3ulztti8.mp4"></input>
   	<a id="addPostroll" href="#">Update Postroll video</a>
    </br>
    <br>Overlay text:<input id="overlay" type="text" size="40" value="my overlay ad"></input>
   	<a id="addOverlay" href="#">Update Overlay text</a>
    </br>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
 	<script src="../../../mwEmbedLoader.js?debug=true" type="text/javascript"></script>
 	<script type="text/javascript">
 		mw.setConfig( 'EmbedPlayer.EnableIpadHTMLControls', true);
 		mw.setConfig( 'EmbedPlayer.OverlayControls', false);
 		
 		mw.ready(function(){
 	 		var embedPlayer = $j('#vid1').get(0);
 	 		
 	 		$j( embedPlayer ).bind( 'openFullScreen', function(){
 	 			embedPlayer.$interface.append( 
 	 	 			'<span class="fullscreenOverlay" style="position:absolute;top:10px;' + 
 	 	 				'left:10px;color:red">fullscreen overlay</span>'
 	 	 	 	);
 	 		});
 	 		$j( embedPlayer ).bind( 'closeFullScreen', function(){
 	 			embedPlayer.$interface.find('.fullscreenOverlay').fadeOut('fast');
 	 		});
 	 		
 	 		$j( embedPlayer ).bind( 'monitorEvent', function(){
 	 	 		if( embedPlayer.$interface.find('.timeOverlay').length == 0 ){
 	 	 			embedPlayer.$interface.append(
 	 	 	 	 		'<span class="timeOverlay" style="position:absolute;top:200px;' + 
 	 	 	 				'left:10px;color:red"></span>' 
	 	 	 		);
 	 	 		} 	 			
 	 		});	
			

			// Alternativly to the monitorEvent you can use the mobileAdTimeline helper 
			// See structure of ad JSON in mw.MobileAdTimeline 
			mw.load( "mw.AdTimeline", function(){
		
				var updateRoll = function( type, url ){
					mw.addAdToPlayerTimeline( embedPlayer, type, 
		 	 	 		{ 
		 	 	 	 		'ads': [
				 	 	 	 	{
			 	 					'videoFile' : url,
			 	 					'companions': [
			 	 		 	 	 		{
					 						'id' : 0,
					 						'html' : '<div style="background-color:#99F">' + type + ' companion Ad</div>'
				 						}
				 					]
		 						}
		 					],
							'companionTargets': [
								{
		 							'elementid':'companionTarget'
		 						}
		 					]	 					
		 	 	 		}							
					)
	 			};
				var updateOverlayAd = function( overalyText ){
					// Insert the overlay video
					mw.addAdToPlayerTimeline( embedPlayer, 'overlay', 
	 	 	 	 		{ 
	 	 	 	 	 		'ads': [
			 	 	 	 		{			 	 
		 	 	 					'companions': [
			 	 	 	 					{
				 							'id' : 1, 
				 							'html' : '<div style="background-color:#F99">' + overalyText +'</div>'
										}
		 		 					],
		 	 	 	 	 			'nonLinear': [
		 	 			            	{
		 	 	 			            	'width' : 320,
		 	 	 			            	'height' : 30,
		 	 	 			            	'html' : '<div style="width:100%;height:100%;background-color:gray;font-size:large">' + overalyText + '</div>'
		 	 			            	}
									]
			 	 	 	 		}
	 	 					],
	 	 			 		'start' : 5,
	 	 	 	 			'frequency' : 10,
	 	 	 	 			'timeout' : 10,
		 					'companionTargets': [
		 					 		{
	 	 								'elementid':'companionTarget'
			 	 					}			
	 	 	 	 			]
	 	 	 	 		}
					);
				}
	 			
	 			// update the preroll / postroll
	 			updateRoll( 'preroll', $j('#preroll').val() );
	 			updateRoll( 'postroll', $j('#postroll').val() ); 
	 			updateOverlayAd( $j('#overlay').val() );
	 			
				// let the user update the preroll:
				$j('#addPreroll').click(function(){
					updateRoll( 'preroll', $j('#preroll').val() );
				});
	 			// let the user update the preroll:
				$j('#addPostroll').click(function(){
					updateRoll(  'postroll', $j('#postroll').val() );
				});
				$j('#addOverlay').click(function(){
					updateOverlayAd( $j('#overlay').val() );
				});
	 			
			});
 		});
 	</script>
  </body>
</html>
<commit_msg>switched loader javascript to loader php<commit_after><html>
  <head>
    <meta name="generator" content="HTML Tidy for Windows (vers 14 February 2006), see www.w3.org">
	
    <title></title>
  </head>
  <body>
    <div style="width:680">
    <div class="playerContainer" style="float:left;width:480px;height:290px;top:0px;left:0px;position:absolute;">
		<video class="persistentNativePlayer" id="vid1" width="480" height="300"
		 poster="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb480.jpg"
		 durationHint="33"
		 >
		 	<source src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb_trailer_iphone.m4v" />
			<source src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb400p.ogv" />
		</video>
	</div>
		<div id="companionTarget" style="float:right;width:180px;height:267px;border:solid thin black">
			Companion target
		</div>
	</div>
	<div style="clear:both"></div>
	    <h1>
      HTML5 ad timeline test
    </h1>
   	<br>Preroll video (5 seconds kaltura) <input id="preroll" type="text" size="40" value="http://cdnbakmi.kaltura.com/p/423851/sp/42385100/serveFlavor/flavorId/1_3ulztti8/name/1_3ulztti8.mp4"></input>
   	<a id="addPreroll" href="#">Update preroll video</a>
    </br>
    <br>Postroll video (5 seconds kaltura) <input id="postroll" type="text" size="40" value="http://cdnbakmi.kaltura.com/p/423851/sp/42385100/serveFlavor/flavorId/1_3ulztti8/name/1_3ulztti8.mp4"></input>
   	<a id="addPostroll" href="#">Update Postroll video</a>
    </br>
    <br>Overlay text:<input id="overlay" type="text" size="40" value="my overlay ad"></input>
   	<a id="addOverlay" href="#">Update Overlay text</a>
    </br>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
  <script type="text/javascript" src="../../../ResourceLoader.php?class=window.jQuery,mwEmbed&&debug=true"></script> 
 	<script type="text/javascript">
 		mw.setConfig( 'EmbedPlayer.EnableIpadHTMLControls', true);
 		mw.setConfig( 'EmbedPlayer.OverlayControls', false);
 		
 		mw.ready(function(){
 	 		var embedPlayer = $j('#vid1').get(0);
 	 		
 	 		$j( embedPlayer ).bind( 'openFullScreen', function(){
 	 			embedPlayer.$interface.append( 
 	 	 			'<span class="fullscreenOverlay" style="position:absolute;top:10px;' + 
 	 	 				'left:10px;color:red">fullscreen overlay</span>'
 	 	 	 	);
 	 		});
 	 		$j( embedPlayer ).bind( 'closeFullScreen', function(){
 	 			embedPlayer.$interface.find('.fullscreenOverlay').fadeOut('fast');
 	 		});
 	 		
 	 		$j( embedPlayer ).bind( 'monitorEvent', function(){
 	 	 		if( embedPlayer.$interface.find('.timeOverlay').length == 0 ){
 	 	 			embedPlayer.$interface.append(
 	 	 	 	 		'<span class="timeOverlay" style="position:absolute;top:200px;' + 
 	 	 	 				'left:10px;color:red"></span>' 
	 	 	 		);
 	 	 		} 	 			
 	 		});	
			

			// Alternativly to the monitorEvent you can use the mobileAdTimeline helper 
			// See structure of ad JSON in mw.MobileAdTimeline 
			mw.load( "mw.AdTimeline", function(){
		
				var updateRoll = function( type, url ){
					mw.addAdToPlayerTimeline( embedPlayer, type, 
		 	 	 		{ 
		 	 	 	 		'ads': [
				 	 	 	 	{
			 	 					'videoFile' : url,
			 	 					'companions': [
			 	 		 	 	 		{
					 						'id' : 0,
					 						'html' : '<div style="background-color:#99F">' + type + ' companion Ad</div>'
				 						}
				 					]
		 						}
		 					],
							'companionTargets': [
								{
		 							'elementid':'companionTarget'
		 						}
		 					]	 					
		 	 	 		}							
					)
	 			};
				var updateOverlayAd = function( overalyText ){
					// Insert the overlay video
					mw.addAdToPlayerTimeline( embedPlayer, 'overlay', 
	 	 	 	 		{ 
	 	 	 	 	 		'ads': [
			 	 	 	 		{			 	 
		 	 	 					'companions': [
			 	 	 	 					{
				 							'id' : 1, 
				 							'html' : '<div style="background-color:#F99">' + overalyText +'</div>'
										}
		 		 					],
		 	 	 	 	 			'nonLinear': [
		 	 			            	{
		 	 	 			            	'width' : 320,
		 	 	 			            	'height' : 30,
		 	 	 			            	'html' : '<div style="width:100%;height:100%;background-color:gray;font-size:large">' + overalyText + '</div>'
		 	 			            	}
									]
			 	 	 	 		}
	 	 					],
	 	 			 		'start' : 5,
	 	 	 	 			'frequency' : 10,
	 	 	 	 			'timeout' : 10,
		 					'companionTargets': [
		 					 		{
	 	 								'elementid':'companionTarget'
			 	 					}			
	 	 	 	 			]
	 	 	 	 		}
					);
				}
	 			
	 			// update the preroll / postroll
	 			updateRoll( 'preroll', $j('#preroll').val() );
	 			updateRoll( 'postroll', $j('#postroll').val() ); 
	 			updateOverlayAd( $j('#overlay').val() );
	 			
				// let the user update the preroll:
				$j('#addPreroll').click(function(){
					updateRoll( 'preroll', $j('#preroll').val() );
				});
	 			// let the user update the preroll:
				$j('#addPostroll').click(function(){
					updateRoll(  'postroll', $j('#postroll').val() );
				});
				$j('#addOverlay').click(function(){
					updateOverlayAd( $j('#overlay').val() );
				});
	 			
			});
 		});
 	</script>
  </body>
</html>

{'fraction_non_alphanumeric': 0.17332544145210615, 'fraction_numerical': 0.02624050508039854, 'mean_word_length': 2.330486202365309, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 117, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5314714', 'n_tokens_mistral': 4948, 'n_tokens_neox': 3700, 'n_words': 533}