| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
TypeType-Player is the TypeScript package that turns TypeType playback sessions into audio and video on an HTMLVideoElement. It owns the Media Source Extensions pipeline and leaves controls and page layout to the consuming application.
The TypeType web client uses this package through TypeType-Frontend. The playback-session API is provided by TypeType-Server.
The package contains no user interface and has no runtime dependencies.
From npm:
npm install @typetype/mseFrom JSR:
bunx jsr add @typetype/mseimport { TypeTypeMsePlayer } from "@typetype/mse";
const engine = new TypeTypeMsePlayer(videoElement, {
endpoint: "/api",
videoId: "VIDEO_ID",
videoItag: 137,
audioItag: 140,
audioTrackId: null,
startTimeMs: 0,
headers: {
Authorization: `Bearer ${token}`,
},
});
engine.on("state", (event) => console.log(event.state));
await engine.load();
await engine.play();
await engine.setQuality({ videoItag: 248 });
await engine.setAudioOnly(true);Inspect the current runtime state with:
const snapshot = engine.snapshot();Always call destroy() when the player is no longer used.
Requirements:
bun install --frozen-lockfile
bun run check
bun run check:docs
bun run check:jsr
bun run test:coverage
bun run buildReleases are published to npm and JSR from version tags through trusted publishing.
Read CONTRIBUTING.md before opening a pull request. Bug reports and feature requests belong in the central issue tracker.
TypeType-Player is licensed under the MIT License.
| Back | FazBrowse Home | New Git URL |