@livepeer-frameworks/streamcrafter-core 0.0.1 → 0.0.2
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 +38 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @livepeer-frameworks/streamcrafter-core
|
|
2
|
+
|
|
3
|
+
Framework-agnostic core for StreamCrafter: WHIP client, WebRTC transport, WebCodecs encoder, audio mixing, and compositor.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Docs: https://docs.frameworks.network
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @livepeer-frameworks/streamcrafter-core
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage (Vanilla)
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { StreamCrafterV2 } from '@livepeer-frameworks/streamcrafter-core';
|
|
19
|
+
import '@livepeer-frameworks/streamcrafter-core/streamcrafter.css';
|
|
20
|
+
|
|
21
|
+
const crafter = new StreamCrafterV2({
|
|
22
|
+
whipUrl: 'https://ingest.example.com/whip/your-stream-key',
|
|
23
|
+
profile: 'broadcast',
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
await crafter.startCamera();
|
|
27
|
+
await crafter.startStreaming();
|
|
28
|
+
|
|
29
|
+
// Later
|
|
30
|
+
await crafter.stopStreaming();
|
|
31
|
+
crafter.destroy();
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- WebCodecs + Web Workers are used when available for background-safe encoding.
|
|
37
|
+
- For custom UIs, build on the core APIs or use the React/Svelte wrappers.
|
|
38
|
+
- CSS export: `@livepeer-frameworks/streamcrafter-core/streamcrafter.css`
|
package/package.json
CHANGED