@htmlbricks/hb-player-live 0.66.8 → 0.66.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
## `hb-player-live` — player live
|
|
2
|
+
|
|
3
|
+
**Category:** media
|
|
4
|
+
**Tags:** media, video, streaming
|
|
5
|
+
|
|
6
|
+
### What it does
|
|
7
|
+
|
|
8
|
+
Live streaming `<video>` player for HLS (hls.js or native), WebSocket WebRTC (`simple-webrtc-element`), or WHEP (MediaMTX). Polls the manifest for HLS liveness, exposes the element via `getVideoElement`, and emits `liveStatus` and `htmlVideoInit`. When the stream is offline or missing, shows optional title/subtitle/text from `replacewithtext`, `forcecover`, or fallback labels.
|
|
9
|
+
|
|
10
|
+
### Custom element
|
|
11
|
+
|
|
12
|
+
`hb-player-live`
|
|
13
|
+
|
|
14
|
+
### Attributes (snake_case; use string values in HTML)
|
|
15
|
+
|
|
16
|
+
- `id`, `style` (optional): strings.
|
|
17
|
+
- `mediauri` (required): string — stream URL (HLS, WebRTC, WHEP as configured).
|
|
18
|
+
- `media_type` (optional): `"hls"` | `"webrtc"` | `"auto"` | `"whep"` (empty string allowed in examples).
|
|
19
|
+
- `forcecover` (optional): string — e.g. `"yes"` to force cover layout with placeholder text.
|
|
20
|
+
- `replacewithtext` (optional): JSON string — `{ title; subtitle?; text? }` when offline.
|
|
21
|
+
- `no_controls` (optional): boolean string — hide native/custom controls.
|
|
22
|
+
|
|
23
|
+
### Events
|
|
24
|
+
|
|
25
|
+
- `liveStatus`: `{ live: boolean; id: string }`.
|
|
26
|
+
- `htmlVideoInit`: `{ video; id: string }`.
|
|
27
|
+
|
|
28
|
+
### Usage notes
|
|
29
|
+
|
|
30
|
+
- **CSS parts:** `container`, `replacewithtext`, `video`.
|
|
31
|
+
- Pick `media_type` to match your pipeline (`whep` for WHEP examples in docs).
|
|
32
|
+
|
|
33
|
+
### Minimal HTML example
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<hb-player-live
|
|
37
|
+
mediauri="https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"
|
|
38
|
+
media_type="hls"
|
|
39
|
+
></hb-player-live>
|
|
40
|
+
```
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-player-live",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.9",
|
|
4
4
|
"contributors": [],
|
|
5
5
|
"description": "Live streaming `<video>` player for HLS (hls.js or native), WebSocket WebRTC (`simple-webrtc-element`), or WHEP (MediaMTX). Polls the manifest for HLS liveness, exposes the element via `getVideoElement`, and emits `liveStatus` and `htmlVideoInit`. When the stream is offline or missing, shows optional title/subtitle/text from `replacewithtext`, `forcecover`, or fallback labels.",
|
|
6
6
|
"licenses": [
|