-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add ability to play/pause and mute/unmute video using props #384
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 78090a5:
|
Here's a working CodeSandbox example: https://codesandbox.io/s/react-easy-crop-forked-0mf3nf |
Thanks for this PR! I'm wondering if we could actually make this more generic and cover more use cases by directly exposing the |
That's a great idea! Let me jam on it a bit and I will update shortly. |
@ValentinH I have updated with optional callback props to set both the image and video refs in the parent component. Theoretically, this could be updated to use a single Edit: CodeSandbox working example: https://codesandbox.io/s/react-easy-crop-forked-6rtj6b?file=/src/index.js |
Thanks for the contribution! |
🚀 PR was released in |
Needed for a current application, figured I would add a PR upstream in case anyone else wants this sort of functionality.
Both props are completely optional, omitting both will not impose any breaking changes to existing cropper setups.