
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>