Tsquini
Tsquini

Reputation: 11

Video-JS how to remove pause play by clicking on Video

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.
    });

Upvotes: 1

Views: 3062

Answers (1)

Ustym Ukhman
Ustym Ukhman

Reputation: 376

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
});

Upvotes: 5

Related Questions