'Open in Browser' feature malfunction
I've got following piece of example code. Simple page, using JS plugin JWPlayer to play video and one button to perform seek action in video.
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<script src="lib/js/jwplayer-7.1.4/jwplayer.js"></script>
<script>jwplayer.key="01yIIa/jGb0bj60C14JSO8oxFHJardSr8Bn/4Q==";</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>
<!-- Loading into the JWPlayer, div ID must be unique -->
<div id="myElement">Loading the player...</div>
<div id="seek" ></div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "lib/video/sample.mp4",
controls : false
});
$('#seek').on('click', function() {
//Performs seek 10 seconds ahead
playerInstance.seek(playerInstance.getPosition() + 10);
});
</script>
</body>
</html>
THE PROBLEM:
Everything works fine if I open the page using full path to the file - let's say file:///C:/Users/.*/index.html. I can perform seek action. Everytime i press seek button, video moves 10seconds forward (in all browsers). BUT if I open the file using 'open in browser' feature in WebStorm - with adress let's say http://localhost:63342/.*/index.html. The seek action malfunctions in Chrome and Opera. When I press seek button in this conditions, the video starts playing over again from the start.
Any idea what this might be happening? How can these 2 even differ?
Please sign in to leave a comment.
Please follow https://youtrack.jetbrains.com/issue/WEB-19331 for updates