videogular2
videogular2 copied to clipboard
Seekbar goes crazy when out of width
Description
When I move out of seekbar (its width to be correct) it nondeterministicaly jumps to random times.
Current setup
https://mybrowser.fyi/report/5c3f57cc8d118e0014b1a7d1 (Chrome Canary) https://mybrowser.fyi/report/5c3f57f78d118e0014b1a7d2 (Vivaldi) https://mybrowser.fyi/report/5c3f582f8d118e0014b1a7d4 (Safari)
Expected Behavior
When I move out of seekbar it should stay at 00:00/end of video.
Actual Behavior
It nondeterministicaly jumps to random times.
Steps to Reproduce
- Leftclick on seekbar
- Move out of videoplayer (out of width, not height)
- Look at seekbar jumping
Attachments
You can try it here https://videogular.github.io/videogular2-showroom/#/single-player
Any updates?
Still having this behaviour, when moving out from the end it keeps at the end, but when moving out of the start, it goes crazy.
I have solved it getting the videogular2 package out of node_modules and using it as an angular element and modifying this code on videogular2/src/controls/vg-scrub-bar/vg-scrub-bar.jsvg-scrub-bar.js
VgScrubBar.prototype.onMouseMoveScrubBar = function ($event) { if (this.target) { if (!this.target.isLive && this.vgSlider && this.isSeeking) { if ( !this.API.fsAPI.isFullscreen && Math.abs(Number($event.clientX) - Number($event.offsetX)) > 5 ) { this.offsetX = $event.offsetX; this.seekMove($event.offsetX); } } } };
VgScrubBar.prototype.onMouseUpScrubBar = function ($event) { if (this.target) { if (!this.target.isLive && this.vgSlider && this.isSeeking) { if ( !this.API.fsAPI.isFullscreen && Math.abs(Number($event.clientX) - Number($event.offsetX)) > 5 ) this.seekEnd($event.offsetX); else this.seekEnd(this.offsetX); } } };
I have fixed it better and created a pull-request.