remotion-dev/remotion









The issue has been solved
Allow to customize the Player UI more, e.g. the Play button #740
JonnyBurger posted onGitHub
š This issue is part of our Hacktoberfest campaign! š Read more about Hacktoberfest here š This issue is currently assigned to @uragirii š° Thanks to CodeChem for sponsoring this issue!
Right now you can set controls
for the Player and choose the default behavior, or you have the build the UI completely yourself.
We want to introduce a middle-way where you can override only certain elements of the Player control.
Acceptance criteria
- Allow at least two types of elements to be overridden, one of them being the Play/Pause button. Others can be: Fullscreen button, volume control, Time component, Slider
- The API could look something like this:
import { PlayButtonRenderMethod } from "@remotion/player"
// ...
const renderPlayPauseButton = useCallback(({paused}) => {
if (paused) {
return <CustomPauseButton />
}
return <CustomPlayButton />
}, []);
<Player renderPlayPauseButton={renderPlayPauseButton} />
- Add documentation to
packages/docs/docs/player/api.md