PlayerBar
Player toolbar for controlling play, pause, stop, previous step, next step, loop control and other operations.
How to Use
- Enable the player toolbar quickly by configuring
addons={["PlayerBar"]}
- Or manually enable it by importing
import { PlayerBar } from "@icraft/player-react"
. Manual enabling allows more flexible control over the player toolbar's style.
The prerequisite for playing animations is that animation schemes have been created in the editor
import { ICraftPlayer } from "@icraft/player-react";
const style = {
width: "100%",
height: "100%",
position: "relative" as const,
overflow: "hidden" as const,
};
export default () => {
return (
<div style={style}>
<ICraftPlayer
src='/templates/ArgoCD.iplayer'
addons={["PlayerBar"]}
/>
</div>
);
};
API
Name | Description | Type | Default | Required |
---|---|---|---|---|
style | Style | React.CSSProperties | false | |
className | Class name | string | false |