Video won't play when calling sendNotification("doPlay")

I am writing script to execute jump links to parts of the video.

document.getElementById(‘kaltura_xxxx’).sendNotification(“doSeek”, 10)
document.getElementById(‘kaltura_xxxx’).sendNotification(“doPlay”)

in the above code, the first line works, video is set to the 10 seconds mark
but the second line does not play the video at all

I’m stuck, what else can I do?

Hello @hbp888,

Below is a fully functional example (you will need to replace PARTNER_ID, ENTRY_ID and UI_CONF_ID with your respective values, naturally):

<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://www.kaltura.com/p/PARTNER_ID/sp/PARTNER_ID00/embedIframeJs/uiconf_id/UI_CONF_ID/partner_id/PARTNER_ID"></script>
<script type="text/javascript">	
function jsKalturaPlayerTest( videoId ){
	
	// Name this module
	module( "Play Stop Api" );
	var kdp = document.getElementById( videoId );
	var numOfPlay = 0;
	var numOfStop = 0;
	asyncTest("Play Stop Events", function(){
	kalturaQunitWaitForPlayer(function(){
		window[ 'onPlayerPlay' ] = function(){
			numOfPlay++;
			onPlayerPlayTime = new Date().getTime();
			console.log("Play event")
		ok( true, 'Player is playing' );
			ok( numOfPlay == 1, 'Only one play event are recorded' );
			setTimeout(function()
			{
				kdp.sendNotification('doStop');
			},4000);
		}
		
		window[ 'onPlayerStop' ] = function(){
			 numOfStop++;
			ok( onPlayerPlayTime !== null, "Stop without play" );
			ok( numOfStop == 1, 'Only one stop event are recorded' );
			ok( true,  'player stop is triggered' );
			var timeFromLastPlay = new Date().getTime() - onPlayerPlayTime;
			ok( ( timeFromLastPlay > 3000 ), "Took " + timeFromLastPlay + "ms from last play" );


			// done with async test:
			start();
		}
		
		// add a seek listener: 
		kdp.addJsListener( 'doPlay', 'onPlayerPlay')
		
		kdp.addJsListener( 'doStop', 'onPlayerStop')

		// issue doPlay call at mediaReady time *kalturaQunitWaitForPlayer*
		kdp.sendNotification('doPlay');
		});
	});
}
</script>
<h2> Play Stop </h2>
Demonstrates basic usage of the play, stop & pause API.
<br>
<pre class="prettyprint linenums">
kWidget.addReadyCallback( function( playerId ){
	var kdp = document.getElementById( playerId );
	$('#sampleActions .btn').click(function(){
		kdp.sendNotfication( $(this).text() );
	});
});
</pre>
<h3> Sample actions: </h3>
<div id="sampleActions">
	<a class="btn">doPlay</a> 
	<a class="btn">doPause</a>
	<a class="btn">doStop</a> 
</div>
<br>
<script>
kWidget.addReadyCallback( function( playerId ){
	var kdp = document.getElementById( playerId );
	$('#sampleActions .btn').click(function(){
		kdp.sendNotification( $(this).text() );
	});
});
</script>

<div id="kaltura_player_1564598506" style="width: 528px; height: 327px;"></div>
<script>
kWidget.embed({
  "targetId": "kaltura_player_1564598506",
  "wid": "_PARTNER_ID",
  "uiconf_id": UI_CONF_ID,
  "flashvars": 
  {
    //"ks": "",
    'flashvars': {
	
    }

  },
  "cache_st": 1564598506,
  "entry_id": "ENTRY_ID"
});
</script>

Looks like Kaltura is blocking play calls from local dev 0.0.0.0 is the issue