
Problem with play() and seek() in JavaScript API
There seem to be problems with the play() and seek() functions in the player's JavaScript API.
If the stop() function is called via the API and then subsequently the play() function is called, the player does not start playing. The play() function must be called a second time before the video will play. I have to use this workaround:
if (initialState === "IDLE"
&& jwplayer(playerId).getState() !== "PLAYING"
&& jwplayer(playerId).getState() !== "BUFFERING"
) {
jwplayer(playerId).play();
}
The seek() function doesn't seem to work reliably. If I do something like
jwplayer(playerId).seek(40);
the video will often start playing at a different spot rather than 40 seconds into the recording.