![](https://secure.gravatar.com/avatar/aca59798ff3a63d9b3d8ebafdee61d77?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
Uncaught TypeError: playerInstance.on is not a function
I'm trying to embed video and it's working, but "on" function doesn't work. It's showing me this error: Uncaught TypeError: playerInstance.on is not a function
My code is just before </body> tag
<script type="text/javascript"> var path_to_video, path_to_image;
path_to_video="http://cms.born2invest.com/uploads/video/2015/09/16/7161.mp4";
path_to_image="http://cms.born2invest.com/uploads/image/2015/09/16/7161.jpg";
path_to_video="http://cms.born2invest.com/uploads/video/video.mp4";
path_to_image="http://worldsoccertalk.com/wp-content/uploads/2011/02/the_fa.jpg";
var playerInstance = jwplayer('myVideo');
playerInstance.setup({
file: path_to_video,
image: path_to_image,
});
playerInstance.on('load', function(){alert();});
//remove overlay for videos
$(".preview_story_info").remove();
</script>