
Prevent seeking/scrubbing (7.12.3)
I've tried implementing something like this
var seeking = false;
var currentPosition = 0;
player.onTime(function (callback) {
currentPosition = callback.position;
});
player.onSeek(function(ev) {
var localPosition = currentPosition;
if (!seeking) {
seeking = true;
player.seek(localPosition);
console.log(localPosition);
} else {
seeking = false;
}
});
The seek event gets hit but somehow there is no "going back", it behaves as if the seek is wrongly called.
I'd appreciate some help.
Thanks,