-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Custom Controls - User is unable to scroll/zoom page if touching the video #895
Comments
Does it fix the issue if you remove preventDefault? It's in there to mimic typical touch reactions, e.g. if you touch and hold, it shouldn't act the same as if you tap. But it sounds like we may be missing something. Can you set up an example online to try out? @gkatsev, any thoughts on this? |
I tried to check it out on my phone but looks like customControlsOnMobile might still be broken per #635. |
I replaced preventDefault with following code: this.one('touchend', function(e) {
e.stopPropagation();
e.preventDefault();
}); Explanation: Not sure if this is good fix, but it works on all our tested devices. Also I noticed same issue with poster which is button object: |
We made some modifications to touch handling so that events are still allowed to bubble. I believe this should be fixed as of 4.4, so I'm going to close this, but please comment and reopen if you find otherwise. |
This is still not fixed. On iPad iOS7 touching videos with custom controls (nativeControlsForTouch: false) does not allow scrolling the page. You can test here: |
i can confirm this bug is still open and not fixed! can you pls fix it? broken page scroll over all video elements is a huge blocker in my oppinion. |
Reopening so we can revisit this one. |
Hi Matt, Any updates on this one? :) thanks, |
The previous example didn't show controls for me so I created a new jsbin for nativeControlsForTouch: |
I can confirm this is still an issue. The line of that needs to be updated is: I'm not immediately clear what the side effects will be of removing preventDefault. I don't think we want to remove it completely and let mouse events happen because we still want a touch and hold to not reveal the controls again on touch devices. It could be that we need to either add a new touchend event listener, or it could be that we can use the emitTapEvents code here. |
We might want to move the |
Yeah, the complication behind touch + controls is:
And I think you're right. Just moving the preventDefault to touchend should fix this. Pull requests welcome if anyone wants to get this one. |
Anyone kindly fix this one? Only myself not so good at js. ;) thanks, |
It's been labeled as unclaimed and easy, so hopefully someone will pick it up and finish it soon. |
You are a star. Thanks. Huff, is this fix included in the next release? |
Yeah, we'll get it in for the next release. |
Hello. |
@dovp How are you adding the |
Added a bunch of text to the example so we could scroll, and scrolling directly on top of the of video element works fine. Zooming also worked as expected. This was on an iPad running iOS 7 and an iPhone running iOS 8. |
Thanks. When I open a page with a video, normally I can do zoom in with multi-touch and with the rightest button on the control bar. By Zoom in I mean switching from normal playing mode to full screen mode. Right now I can switch to full screen only if I press on the rightest button but I can't do multi-touch over the video. I hope I was more clear this time. |
Hi Guys,
I just have found one issue which is serious for my project. If I have enabled custom controls on mobile then I am not able to scroll/zoom the page if I am touching the video (tested on iOS and Android).
I found that issue is probably preventDefault which is called at touchstart event here:
https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L84.
Could this be fixed or could you help me how can I workaround this?
Thanks,
Fero
The text was updated successfully, but these errors were encountered: