videogular2 icon indicating copy to clipboard operation
videogular2 copied to clipboard

Seekbar goes crazy when out of width

Open BleedingDev opened this issue 6 years ago • 4 comments

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

  1. Leftclick on seekbar
  2. Move out of videoplayer (out of width, not height)
  3. Look at seekbar jumping

Attachments

You can try it here https://videogular.github.io/videogular2-showroom/#/single-player

BleedingDev avatar Jan 16 '19 16:01 BleedingDev

Any updates?

Stroncii avatar Aug 06 '19 08:08 Stroncii

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.

pyrextor avatar Mar 11 '21 11:03 pyrextor

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); } } };

pyrextor avatar Mar 11 '21 14:03 pyrextor

I have fixed it better and created a pull-request.

pyrextor avatar Mar 18 '21 15:03 pyrextor