https://github.com/redstonewizard08/youtubeplayer
A terrible clone of the YouTube video player.
https://github.com/redstonewizard08/youtubeplayer
audio free github html html5 javascript javascript-library learn media mit-license nodejs npm oss player student-vscode typescript typescript-library video vite youtube
Last synced: 4 months ago
JSON representation
A terrible clone of the YouTube video player.
- Host: GitHub
- URL: https://github.com/redstonewizard08/youtubeplayer
- Owner: RedstoneWizard08
- License: mit
- Created: 2022-10-09T23:11:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-04T19:47:46.000Z (over 3 years ago)
- Last Synced: 2025-03-15T12:34:19.766Z (over 1 year ago)
- Topics: audio, free, github, html, html5, javascript, javascript-library, learn, media, mit-license, nodejs, npm, oss, player, student-vscode, typescript, typescript-library, video, vite, youtube
- Language: TypeScript
- Homepage: https://redstonewizard08.github.io/YouTubePlayer/
- Size: 21.9 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YouTubePlayer
A terrible clone of the YouTube video player.
## Installation
1. Create a `.npmrc` file in your project with this inside of it:
```npmrc
@redstonewizard08:registry=https://npm.pkg.github.com
```
2. Install the package:
```sh
npm install @redstonewizard08/youtube-player
```
## Usage
1. Import the library.
```ts
// Import the YouTubePlayer utility class.
import YouTubePlayer, { type VideoData } from "@redstonewizard08/youtube-player";
```
2. Create a player instance.
```ts
const videos: VideoData[] = [
{
album: "Stardew Valley - Roguelike Mod OST",
artist: "Therm",
title: "Hold Your Ground",
// Note: These work with Data URIs!
poster: "./assets/Hold Your Ground.png",
source: "./assets/Hold Your Ground.mp4",
},
];
YouTubePlayer.createPlaylistPlayer(videos);
```