1
1
Fork
You've already forked basic_ll-hls.js
0
Minimal, Low-Latency HLS player written in TypeScript.
  • TypeScript 98.9%
  • HTML 1.1%
Find a file
Curid b33b7c75bc
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
detect failed buffer appends
2023年03月08日 20:09:09 +00:00
src detect failed buffer appends 2023年03月08日 20:09:09 +00:00
.gitignore initial commit 2022年07月10日 18:23:55 +00:00
.woodpecker.yml migrate to codeberg 2023年03月05日 20:58:37 +00:00
index.html initial commit 2022年07月10日 18:23:55 +00:00
LICENSE initial commit 2022年07月10日 18:23:55 +00:00
package-lock.json mitigate endTS spikes 2023年03月08日 19:56:27 +00:00
package.json detect failed buffer appends 2023年03月08日 20:09:09 +00:00
README.md detect failed buffer appends 2023年03月08日 20:09:09 +00:00
tsconfig.json initial commit 2022年07月10日 18:23:55 +00:00
vite.config.ts initial commit 2022年07月10日 18:23:55 +00:00

Basic_LL-HLS.js is a minimal, Low-Latency HLS player written in TypeScript.

The server must support HLS version 9. Earlier versions are not supported.

Usage

import Hls from "./hls.js";
//const Hls = require("./hls.cjs")
const hls = new Hls(hlsConfig);
hls.onError = (error) => {
	console.log(error);
};
const $video = document.querySelector(".js-video");
const url = "https://localhost:8888/test/index.m3u8";
hls.init($video, url)
const hlsConfig = {
	maxDelaySec: 2,
	maxFailedBufferAppends: 3,
	maxRecoveryAttempts: 3,
	recoverySleepSec: 3
};

Features

Supported tags

  • #EXTM3U
  • #EXT-X-VERSION=<n>
  • #EXT-X-STREAM-INF:<attribute-list>
  • #EXT-X-MEDIA-SEQUENCE=<n>
  • #EXT-X-MAP:<attribute-list>
  • #EXT-X-SERVER-CONTROL:<attribute-list>
  • #EXT-X-PART-INF:
  • #EXT-X-PART:<attribute-list>
  • #EXT-X-PRELOAD-HINT:<attribute-list>
  • #EXT-X-SKIP:SKIPPED-SEGMENTS=<n>
  • <URI>

Features that will not be supported.

  • Adaptive streaming
  • Encrypted media extensions
  • Ability to seek in buffer
  • Built-in Analytics

Specification

https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis


License

This project is licensed under MPLv2.

What is the Mozilla Public License?