Importing the library
To import the library, use this code:
- CommonJS Modules
- ES Modules
- TypeScript
const YouTubePlayer = require("@redstonewizard08/youtube-player");
import YouTubePlayer from "@redstonewizard08/youtube-player";
// Importing the "type VideoData" is optional, but it
// allows you to type your variables more effectively.
import YouTubePlayer, { type VideoData } from "@redstonewizard08/youtube-player";