Floating Tips
The following is an example showing how to display a floating tooltip for an element.
import type { ICraftPlayerInstance } from "@icraft/player";
import { ICraftPlayer } from "@icraft/player";
import { useRef } from "react";
export default () => {
const instanceRef = useRef<ICraftPlayerInstance>();
const onReady = () => {
instanceRef.current.showTips(true);
};
return (
<ICraftPlayer fileUrl="/AI.iplayer" ref={instanceRef} onReady={onReady} />
);
};