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

userActions click true not working on mobile devices #8950

Open
LukeMcLachlan opened this issue Dec 27, 2024 · 2 comments
Open

userActions click true not working on mobile devices #8950

LukeMcLachlan opened this issue Dec 27, 2024 · 2 comments

Comments

@LukeMcLachlan
Copy link

I have noticed that the videos do not recognise a click when viewed on a mobile device, even with controls set to true.

To emulate this, simply go to video.js on a mobile device, click to play the main video and then try to pause or resume the video by clicking on the video body (i.e not on the controls). From what I understand, the click action (or "tap" in this case) should toggle the play state.

Any suggestions?

My full code:

<video
    id="my-video2"
    class="video-js"
    
    width="175px" 
    height="auto"
  >
  <source src="img/20240628_151819.mp4" type="video/mp4">
    <p class="vjs-no-js">
      To view this video please enable JavaScript, and consider upgrading to a
      web browser that
      <a href="https://videojs.com/html5-video-support/" target="_blank"
        >supports HTML5 video</a
      >
    </p>
  </video>
$(document).ready(function() {

var player1 = videojs('my-video1', {
  controls: true,
  autoplay: false,
  preload: true,
  userActions: {
    click: true
  }
});

});

Thanks / Luke

Copy link

welcome bot commented Dec 27, 2024

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@LukeMcLachlan
Copy link
Author

typically, I found a similar issue after posting mine and the solution posted there: #6956 (comment), works very well.

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

No branches or pull requests

1 participant