<commit_before><?php 
if(!isset($_GET['partnerId']))
	die('partnerId must be supplied in query string');
	
if(!isset($_GET['playerVersion']))
	die('html5 lib version must be supplied in query string');

$partnerId = $_GET['partnerId'];

$html5Version = $_GET['playerVersion'];
?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="lt-ie10 lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="lt-ie10 lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="lt-ie10 lt-ie9"> <![endif]-->
<!--[if lt IE 10]>     <html class="lt-ie10"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	
	<title>Big-Red-Button Demo</title>
	<link type="text/css" rel="stylesheet" href="/lib/css/kmc.css" />
	<style>
		#main .content .title h1 { font-size: 24px; font-weight: bold; }
		#main p { margin-bottom: 20px; font-size: 18px; }
	</style>
	
	<script src="/lib/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="/html5/html5lib/<?php echo $html5Version; ?>/mwEmbedLoader.php"></script>
	<script type="text/javascript" src="swfobject.js"></script>
	<script>
		var partnerId = <?php echo $partnerId; ?>;
		var ks = null;
		var lastSyncPointTime = null;
		var lastSyncPointOffset = null;
		var lastSyncPointTimestamp = null;

		function loadPlayer(){
			var entryId = $('#txtEntryId').val();
			var uiConfId = $('#txtUiConfId').val();

			var hlsUrl = location.protocol + '//';
			hlsUrl += location.host;
			hlsUrl += '/p/' + partnerId + '/playManifest/format/applehttp';
			hlsUrl += '/entryId/' + entryId;

			var stitchedUrl = hlsUrl;

			hlsUrl += '/a/playlist.m3u8';
			stitchedUrl += '/uiConfId/' + uiConfId;
			stitchedUrl += '/usePlayServer/1/a/playlist.m3u8';

			var hdsUrl = location.protocol + '//';
			hdsUrl += location.host;
			hdsUrl += '/p/' + partnerId + '/playManifest/format/hds';
			hdsUrl += '/entryId/' + entryId;
			hdsUrl += '/a/a.f4m';

			var html = '<b>HLS URL:</b> <a href="' + hlsUrl + '" target="_tab">' + hlsUrl + '</a><br/>';
			html += '<b>Stitched URL:</b> <a href="' + stitchedUrl + '" target="_tab">' + stitchedUrl + '</a><br/>';
			html += '<b>HDS URL:</b> <a href="' + hdsUrl + '" target="_tab">' + hdsUrl + '</a>';
			$('#lblUrl').html(html);

			 mw.setConfig('Kaltura.LeadWithHTML5', true);
			loadAdminPlayer(entryId, uiConfId);
			loadUserPlayer(entryId, uiConfId);
			startSession();
		}

		function startSession(){
			var secret = $('#txtSecret').val();

			$.ajax(
				'/api_v3/index.php/service/session/action/start', {
				data: {
					format: 1,
					partnerId: partnerId,
					secret: secret,
					type: 2
				},
				error: function(jqXHR, textStatus, errorThrown){
					alert(errorThrown);
				},
				success: function(data, textStatus, jqXHR){
					if(data.code && data.message){
						alert(data.message);
						return;
					}
						
					ks = data;
				}
			});
		}

		function loadUserPlayer(entryId, uiConfId){
            kWidget.embed({
                    targetId: 'userPlayerContainer',
                    wid: '_' + partnerId,
                    "uiconf_id": uiConfId,
                    "flashvars": {
                            "streamerType": "auto",
                            "autoPlay": true,
                            "LeadWithHLSOnFlash": true
                    },
                    "cache_st": 1410340114,
                    "entry_id": entryId
            });
		}

		function loadAdminPlayer(entryId, uiConfId){
		     kWidget.embed({
					 targetId: 'adminPlayerContainer',
					 wid: '_' + partnerId,
					 "uiconf_id": uiConfId,
					 "flashvars": {
							 "streamerType": "hds",
							 "autoPlay": true,
							 "LeadWithHLSOnFlash": false
					 },
					 "cache_st": 1410340114,
					 "entry_id": entryId,
					 "readyCallback": function( playerId ){
						var adminKdp = document.getElementById( playerId );
						adminKdp.addJsListener( 'videoMetadataReceived', 'onSyncPoint' );
					}
			 });
		}

		function onSyncPoint(metadata){
			if ( metadata && metadata.objectType == "KalturaSyncPoint") {<commit_msg>#FEC-4066 force hds in BRB admin player<commit_after><?php 
if(!isset($_GET['partnerId']))
	die('partnerId must be supplied in query string');
	
if(!isset($_GET['playerVersion']))
	die('html5 lib version must be supplied in query string');

$partnerId = $_GET['partnerId'];

$html5Version = $_GET['playerVersion'];
?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="lt-ie10 lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="lt-ie10 lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="lt-ie10 lt-ie9"> <![endif]-->
<!--[if lt IE 10]>     <html class="lt-ie10"> <![endif]-->
<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	
	<title>Big-Red-Button Demo</title>
	<link type="text/css" rel="stylesheet" href="/lib/css/kmc.css" />
	<style>
		#main .content .title h1 { font-size: 24px; font-weight: bold; }
		#main p { margin-bottom: 20px; font-size: 18px; }
	</style>
	
	<script src="/lib/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="/html5/html5lib/<?php echo $html5Version; ?>/mwEmbedLoader.php"></script>
	<script type="text/javascript" src="swfobject.js"></script>
	<script>
		var partnerId = <?php echo $partnerId; ?>;
		var ks = null;
		var lastSyncPointTime = null;
		var lastSyncPointOffset = null;
		var lastSyncPointTimestamp = null;

		function loadPlayer(){
			var entryId = $('#txtEntryId').val();
			var uiConfId = $('#txtUiConfId').val();

			var hlsUrl = location.protocol + '//';
			hlsUrl += location.host;
			hlsUrl += '/p/' + partnerId + '/playManifest/format/applehttp';
			hlsUrl += '/entryId/' + entryId;

			var stitchedUrl = hlsUrl;

			hlsUrl += '/a/playlist.m3u8';
			stitchedUrl += '/uiConfId/' + uiConfId;
			stitchedUrl += '/usePlayServer/1/a/playlist.m3u8';

			var hdsUrl = location.protocol + '//';
			hdsUrl += location.host;
			hdsUrl += '/p/' + partnerId + '/playManifest/format/hds';
			hdsUrl += '/entryId/' + entryId;
			hdsUrl += '/a/a.f4m';

			var html = '<b>HLS URL:</b> <a href="' + hlsUrl + '" target="_tab">' + hlsUrl + '</a><br/>';
			html += '<b>Stitched URL:</b> <a href="' + stitchedUrl + '" target="_tab">' + stitchedUrl + '</a><br/>';
			html += '<b>HDS URL:</b> <a href="' + hdsUrl + '" target="_tab">' + hdsUrl + '</a>';
			$('#lblUrl').html(html);

			 mw.setConfig('Kaltura.LeadWithHTML5', true);
			loadAdminPlayer(entryId, uiConfId);
			loadUserPlayer(entryId, uiConfId);
			startSession();
		}

		function startSession(){
			var secret = $('#txtSecret').val();

			$.ajax(
				'/api_v3/index.php/service/session/action/start', {
				data: {
					format: 1,
					partnerId: partnerId,
					secret: secret,
					type: 2
				},
				error: function(jqXHR, textStatus, errorThrown){
					alert(errorThrown);
				},
				success: function(data, textStatus, jqXHR){
					if(data.code && data.message){
						alert(data.message);
						return;
					}
						
					ks = data;
				}
			});
		}

		function loadUserPlayer(entryId, uiConfId){
            kWidget.embed({
                    targetId: 'userPlayerContainer',
                    wid: '_' + partnerId,
                    "uiconf_id": uiConfId,
                    "flashvars": {
                            "streamerType": "auto",
                            "autoPlay": true,
                            "LeadWithHLSOnFlash": true
                    },
                    "cache_st": 1410340114,
                    "entry_id": entryId
            });
		}

		function loadAdminPlayer(entryId, uiConfId){
		     kWidget.embed({
					 targetId: 'adminPlayerContainer',
					 wid: '_' + partnerId,
					 "uiconf_id": uiConfId,
					 "flashvars": {
							 "streamerType": "hds",
							 "autoPlay": true,
							 "forceHDS": true,
							 "LeadWithHLSOnFlash": false
					 },
					 "cache_st": 1410340114,
					 "entry_id": entryId,
					 "readyCallback": function( playerId ){
						var adminKdp = document.getElementById( playerId );
						adminKdp.addJsListener( 'videoMetadataReceived', 'onSyncPoint' );
					}
			 });
		}

		function onSyncPoint(metadata){
			if ( metadata && metadata.objectType == "KalturaSyncPoint") {
{'fraction_non_alphanumeric': 0.18631452581032412, 'fraction_numerical': 0.016566626650660263, 'mean_word_length': 2.676522506619594, 'pattern_counts': {'":': 31, '<': 103, '<?xml version=': 0, '>': 101, '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': '5512723', 'n_tokens_mistral': 3419, 'n_tokens_neox': 2821, 'n_words': 586}