1
votes

I am using Video js player version 5.4.4. I want to be able to remove the Play/Pause toggle when clicking on the video. I am going to place another action on the click event. The 2 click events are conflicting with each other.


    $( "li .video-js" ).click(function() {
        //Do something here.
        //But the playToggle event is conflicting.
    });

1

1 Answers

5
votes

This should work just fine for you:

.video-js.vjs-playing .vjs-tech {
  pointer-events: none;
}

As an alternative, you could try a little workaround:

myAwesomePlayer.on('pause', function() {
  myAwesomePlayer.play();
  // ...so you can do here all the stuff you want while the video is playing
});