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

mouseout is triggering fadeOut when moving mouse across control bar #602

Closed
sansb opened this issue Jun 25, 2013 · 4 comments
Closed

mouseout is triggering fadeOut when moving mouse across control bar #602

sansb opened this issue Jun 25, 2013 · 4 comments
Labels

Comments

@sansb
Copy link
Contributor

sansb commented Jun 25, 2013

The 'mouseout' event is getting triggered when moving between different parts of the control bar, and this is causing a fadeOut to get called when it shouldn't. The visible effect of this is some elements on the control bar will jitter around when you move the mouse around while a video is playing. This can be seen on the video here http://www.videojs.com/.

sansb pushed a commit to theonion/video.js that referenced this issue Jun 25, 2013
sansb pushed a commit to theonion/video.js that referenced this issue Jun 25, 2013
…nd fires a new event called vjs-mouseout which accurately detects leaving the vjs element
@sansb
Copy link
Contributor Author

sansb commented Jun 25, 2013

I think the 2nd option is better.

@heff
Copy link
Member

heff commented Jun 26, 2013

I don't think all of the code is needed. The fixEvent function should clean up cross browser issue at least before it gets to this point.
https://github.com/videojs/video.js/blob/v4.0.4/src/js/events.js#L185

Help me understand what this is doing.

@sansb
Copy link
Contributor Author

sansb commented Jul 30, 2013

Sorry for the long delay! Been very busy pushing our new player. We're now running videojs 4.0.

I don't think fixEvent function does what we need here. The issue here is that the 'mouseout' event fires when you mouseout of individual components on the control bar. See what I mean here- http://jsfiddle.net/sansb/eupHp/. If you run your mouse over the control bar you'll see the mouseover and mouseout events firing rapidly. Because in control-bar.js we bind 'mouseout' to fadeOut and 'mouseover' to fadeIn, fadeOut and fadeIn are getting called rapidly when you run the mouse over the control bar, which makes some of the components on the control bar jitter as you move your mouse. If you try this on the videojs homepage with the control bar size turned all the way up you can see the jitter better.

What my patch does is creates a new event for firing the fadeOut function, vjs-mouseout, which is just like mouseout except it only fires when the mouse moves onto an element outside of the player. This was the best solution I could think of at the time. I can think of a few other possible ways to handle it, but this is the most direct.

@heff
Copy link
Member

heff commented Jul 30, 2013

Ok cool, thanks. I'm in progress on control bar change that attempts to address this and about 6 or 7 other control bar issues. When I get the pull request up I'd appreciate your input.

@heff heff closed this as completed in 02de927 Aug 9, 2013
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants