Player
Floating Tips

Floating Tips

The following is an example showing how to display a floating tooltip for an element.

Edit iCraft Player - Demo(showTips) (opens in a new tab)

 
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} />
  );
};