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
Be able to override click to pause/play #101
Comments
I'll add options for Shortcuts |
@JimLiu thanks for offering to support the feature! You have a timeline in mind? |
feat: Add property to disable click for shortcut #101
Added a new property for import React from 'react';
import { Player, Shortcut } from 'video-react';
export default function MyPlayer() {
return (
<Player
playsInline
poster="/static/poster.png"
src="https://media.w3.org/2010/05/sintel/trailer_hd.mp4"
>
<Shortcut clickable={false} />
</Player>
);
} |
Thanks @JimLiu but I think Compared to VideoJS ... completely zero user-interaction, which is what I would expect. Also looks like even with the clicking disabled, keyboard shortcuts are still enabled by default without an easy way to disable them all. |
Issue description
#0.10.4
Chrome-64.0.3282.186
Steps to reproduce issue
<Player>
and click on it - it will pauseExpected behaviour
It would be nice to able to add a prop to disable this if necessary like
<Player disablePauseOnClick={true}/>
Actual behaviour
All videos pause on click even if you add an onClick event to the Player component.
I've been able to have the video continue playing by wrapping the
play()
method in a timeout call on a parent element around Player but this still shows the pause animation:Hack:
The text was updated successfully, but these errors were encountered: