![](https://secure.gravatar.com/avatar/a6b3e1684dab2fdd8ff1ceb5d6ed795f?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
How to restrict hte video playing to 20 sec
Hi,
i have jw platform account and am displaying videos in my wordpress website with platform api and jw player.
how i can stop the playing of video when it reaches 20 sec.
am using like this
<?php
require_once('botr/api.php');
$botr_api = new BotrAPI('xxx', 'yyy');
$response1 = $botr_api->call("/videos/show",array('video_key'=>'aaa'));
$video = $response1['video']['key'];
?>
<script type="text/javascript" src="jwplayer/jwplayer.js"></script>
<div id="testing"></div>
<script>
jwplayer("testing").setup({
playlist: "http://content.jwplatform.com/jw6/<?php echo $video; ?>.xml",
width:'50%'
});
</script>