muxinc/elements

Bug: Cannot disable play / pause on spacebar press

Opened this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-player-react

Which browsers are you using?

Chrome

Which operating systems are you using?

Other (add details below)

Description

I would like to playback video "programmatically", i.e. without Mux Player's controls or keyboard listeners.

Reduced test case

No response

Steps to reproduce

I'm using the following code:

  <MuxPlayer
    playbackId={pageData.header.video.asset.playbackId}
    preload="auto"
    autoPlay
    loop
    muted
    playsInline
    className="h-screen w-full object-cover"
    style={{
      // @ts-ignore
      "--controls": "none",
    }}
    nohotkeys
  />

Current Behavior

Playback works and the controls are hidden. But, when I focus the video by clicking on it, I can play / pause by hitting spacebar.

Expected Behavior

My expectation is that the nohotkey prop would disable that. I did check the docs and issues and couldn't find a way to disable play / pause on spacebar.

Errors

No response

What version of the package are you using?

No response

Hey @donalffons haven't been able to dig too deeply into this, but this does appear to be a bug. Thanks for reporting! I'll keep you posted when we're able to get this into our priority queue.