Embed Player bypass Restrictions

Hi There

We are trying to use the Kaltura Player Widget in our platform to display videos. We have two portals essentially, one for Admin and one for Non-Admin. We were wondering when using the Kaltura Player if there is a way to bypass restrictions so that if we have setup an IP Range restriction, in our Admin portal we want everyone to be able to see this video. We have the ability to generate a KS token from credentials we have persisted for users. Below is cut down version of how we are using the player.

<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
	
	<div style="width:500px">
		<div id="myEmbedTarget" style="width:100%; height:500px;"></div>
	</div>
			
	<script src="https://cdnapisec.kaltura.com/p/{partnerId}/sp/{partnerId}00/embedIframeJs/uiconf_id/{uiConfId}/partner_id/{partnerId}"></script>
	
	<script>	
		//TODO: Allow overiding of Kaltura restrictions, possibly logging in/passing over a secret
		window.kWidget.embed({
			'targetId': 'myEmbedTarget',
			'wid': '_{partnerId}',
			'uiconf_id' : {uiConfId},
			'entry_id' : '{entryId}',
		});	
	</script>
</body>
</html>

Hi @chrissAMD ,

If you generate an ADMIN type KS and set it in the embed code, it will bypass any access control restrictions. For good measure, since you only want to allow playback in this scenario, you should generate the KS with these privileges:

disableentitlementforentry:$ENTRY_ID,setrole:PLAYBACK_BASE_ROLE,sview:$ENTRY_ID

This will also bypass the content entitlement mechanism, see:

To use generated KS in the embed code, add:

“flashvars”: { “ks”: ‘KS_HERE’}

Which would make the embed code look like this:

	<script>	
		//TODO: Allow overiding of Kaltura restrictions, possibly logging in/passing over a secret
		window.kWidget.embed({
			'targetId': 'myEmbedTarget',
			'wid': '_{partnerId}',
			'uiconf_id' : {uiConfId},
			'entry_id' : '{entryId}',
                        'flashvars': {
                           'ks': 'KS_HERE'
                        },

		});	
	</script>

Cheers,