Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seekbar goes crazy when out of width #810

Open
BleedingDev opened this issue Jan 16, 2019 · 4 comments · May be fixed by #917
Open

Seekbar goes crazy when out of width #810

BleedingDev opened this issue Jan 16, 2019 · 4 comments · May be fixed by #917

Comments

@BleedingDev
Copy link

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

@Stroncii
Copy link

Stroncii commented Aug 6, 2019

Any updates?

@pyrextor
Copy link

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
Copy link

pyrextor commented Mar 11, 2021

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 added a commit to pyrextor/videogular2 that referenced this issue Mar 18, 2021
… out

Fix issue videogular#810, seekbar doesn't go crazy when cursor is sliding the
seekbar and gets out of the player. Instead getting offsetX, now get the
cursor x coordinate and calculates its position relative to the
scrub-bar to calculate the correct position.

BREAKING CHANGE: 🧨 none

✅ Closes: videogular#810
@pyrextor
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants