<commit_before><!DOCTYPE HTML>
<html>
<head>
<title>Use HLS Where Available 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" src="../../../docs/js/doc-bootstrap.js"></script>
<script type="text/javascript">	
function jsKalturaPlayerTest( videoId ){
	
	// Name this module
	module( "Use HLS Where Available" );
	
	var $iframe = $( '#' + videoId + '_ifp' ).contents();
	
	asyncTest("HLS test", function(){
		var dummyvid = document.createElement( "video" );
		// check if the browser can even support HLS: 
		if( mw.isIOS() || dummyvid.canPlayType('application/vnd.apple.mpegurl; codecs="avc1.42E01E"' ) ){
			kalturaQunitWaitForPlayer(function(){
				var player = $iframe.find('#kaltura_player')[0];
				var selectedSource = player.mediaElement.selectedSource;
				equal( selectedSource.mimeType, "application/vnd.apple.mpegurl", 
						"Adaptive stream selected, content duration:" + player.getDuration() );
				start();
			});
		} else {
			ok( true, "This test only applies to HLS enabled browsers");
			start();
		}
	});
}
if( ! mw ){
	var mw = {};
}

mw.isIphone = function(){
	return ( navigator.userAgent.indexOf('iPhone') != -1 && ! mw.isIpad() );
};
mw.isIpod = function(){
	return (  navigator.userAgent.indexOf('iPod') != -1 );
};
mw.isIpad = function(){
	return ( navigator.userAgent.indexOf('iPad') != -1 );
};
mw.isIOS = function(){
	return ( mw.isIphone() || mw.isIpod() || mw.isIpad() );
};

</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> Use HLS Where Available test </h2>
<div id="playbackModeSelector"></div>
<br />
<div id="kaltura_player" style="width:400px;height:333px;"></div>
<script>
	kWidget.embed( {
		'targetId' :'kaltura_player',
		'wid': '_243342',
		'uiconf_id' : '12905712',
		'entry_id': '0_uka1msg4'
	});
</script>
</body>
</html><commit_msg>use hls on android as well<commit_after><!DOCTYPE HTML>
<html>
<head>
<title>Use HLS Where Available 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" src="../../../docs/js/doc-bootstrap.js"></script>
<script type="text/javascript">
function jsKalturaPlayerTest( videoId ){
	
	// Name this module
	module( "Use HLS Where Available" );
	
	var $iframe = $( '#' + videoId + '_ifp' ).contents();
	
	asyncTest("HLS test", function(){
		var dummyvid = document.createElement( "video" );
		// check if the browser can even support HLS: 
		if( mw.isIOS() || dummyvid.canPlayType('application/vnd.apple.mpegurl; codecs="avc1.42E01E"' ) ){
			kalturaQunitWaitForPlayer(function(){
				var player = $iframe.find('#kaltura_player')[0];
				var selectedSource = player.mediaElement.selectedSource;
				equal( selectedSource.mimeType, "application/vnd.apple.mpegurl", 
						"Adaptive stream selected, content duration:" + player.getDuration() );
				start();
			});
		} else {
			ok( true, "This test only applies to HLS enabled browsers");
			start();
		}
	});
}
if( ! mw ){
	var mw = {};
}

mw.isIphone = function(){
	return ( navigator.userAgent.indexOf('iPhone') != -1 && ! mw.isIpad() );
};
mw.isIpod = function(){
	return (  navigator.userAgent.indexOf('iPod') != -1 );
};
mw.isIpad = function(){
	return ( navigator.userAgent.indexOf('iPad') != -1 );
};
mw.isIOS = function(){
	return ( mw.isIphone() || mw.isIpod() || mw.isIpad() );
};

</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> Use HLS Where Available test ( including android ) </h2>
<div id="playbackModeSelector"></div>
<br />
<div id="kaltura_player" style="width:400px;height:333px;"></div>
<script>
	kWidget.embed( {
		'targetId' :'kaltura_player',
		'wid': '_243342',
		'uiconf_id' : '12905712',
		'entry_id': '0_uka1msg4',
		'flashvars': {
			'Kaltura.LeadHLSOnAndroid' : true
		}
	});
</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.1957073621047773, 'fraction_numerical': 0.015693514885760443, 'mean_word_length': 4.370508054522924, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, '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': '4738923', 'n_tokens_mistral': 1658, 'n_tokens_neox': 1499, 'n_words': 319}