videojs-offset
videojs-offset copied to clipboard
Issue with _restartBeginning = false
Description
When I tried to set _restartBeginning = false and have the video reached the end then replay, it does not start at the beginning of the offset we set
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
- Init videojs offset with _restartBeginning = false, play the video until it reaches the end. To make the issue clearly observe-able, please set the offsetStart around ~ 00:01 second
- Press replay button
Results
Expected
The video replay at the video's offsetStart position
Actual
The video replay at the this._offsetEnd - this._offsetStart position and if we set _offsetStart = 1 second, the video just replay in 1 second then stop
Error output
If there are any errors at all, please include them here.
Additional Information
In onPlayerTimeUpdate function, I found that:
if (!this._restartBeginning) { this.currentTime(this._offsetEnd - this._offsetStart); } else { .... }
versions
videojs
what version of videojs does this occur with?
browsers
what browser are affected?
OSes
what platforms (operating systems and devices) are affected?
plugins
are any videojs plugins being used on the page? If so, please list them below.
I see this too – and am struggling to figure out how to fix it.