@stinkycomputing/web-live-player 0.1.0 → 0.1.1
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 +324 -323
- package/dist/decoders/wasm-decoder.d.ts +0 -1
- package/dist/web-live-player.cjs +1 -1
- package/dist/web-live-player.mjs +2 -3
- package/package.json +57 -54
- package/dist/player/base-player.test.d.ts +0 -8
- package/dist/scheduling/frame-scheduler.test.d.ts +0 -11
- package/dist/vitest.config.d.ts +0 -2
package/dist/web-live-player.mjs
CHANGED
|
@@ -450,13 +450,12 @@ class En {
|
|
|
450
450
|
d(this, "_queueSize", 0);
|
|
451
451
|
d(this, "pendingTimestamps", []);
|
|
452
452
|
d(this, "pendingFrames", []);
|
|
453
|
-
d(this, "maxQueueSize");
|
|
454
453
|
d(this, "onFrameDecoded");
|
|
455
454
|
d(this, "onError");
|
|
456
455
|
// @ts-ignore - kept for future use
|
|
457
456
|
d(this, "onQueueOverflow");
|
|
458
457
|
d(this, "configured", !1);
|
|
459
|
-
this.onFrameDecoded = U.onFrameDecoded, this.onError = U.onError, this.onQueueOverflow = U.onQueueOverflow
|
|
458
|
+
this.onFrameDecoded = U.onFrameDecoded, this.onError = U.onError, this.onQueueOverflow = U.onQueueOverflow;
|
|
460
459
|
}
|
|
461
460
|
get queueSize() {
|
|
462
461
|
return this._queueSize;
|
|
@@ -515,7 +514,7 @@ class En {
|
|
|
515
514
|
* Send frame to worker for decoding
|
|
516
515
|
*/
|
|
517
516
|
decode(U) {
|
|
518
|
-
!this.worker || !this.configured || (this._queueSize
|
|
517
|
+
!this.worker || !this.configured || (this._queueSize++, this.worker.postMessage({
|
|
519
518
|
type: "decode",
|
|
520
519
|
data: U.buffer,
|
|
521
520
|
offset: U.byteOffset,
|
package/package.json
CHANGED
|
@@ -1,54 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@stinkycomputing/web-live-player",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/web-live-player.cjs",
|
|
7
|
-
"module": "./dist/web-live-player.mjs",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
],
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@stinkycomputing/web-live-player",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "A Player library for Sesame video streams using WebCodecs and MoQ",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/web-live-player.cjs",
|
|
7
|
+
"module": "./dist/web-live-player.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"repository": { "url": "https://github.com/stinkydev/web-live-player"},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/web-live-player.mjs",
|
|
13
|
+
"require": "./dist/web-live-player.cjs",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "vite",
|
|
25
|
+
"build": "vite build -c vite.config.lib.ts",
|
|
26
|
+
"build:demo": "vite build",
|
|
27
|
+
"preview": "vite preview",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"test": "vitest run",
|
|
30
|
+
"test:watch": "vitest",
|
|
31
|
+
"clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
32
|
+
"prepublishOnly": "npm run clean && npm run typecheck && npm test && npm run build",
|
|
33
|
+
"publish:npm": "npm publish --access public"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^20.0.0",
|
|
37
|
+
"typescript": "^5.0.0",
|
|
38
|
+
"vite": "^4.4.9",
|
|
39
|
+
"vite-plugin-dts": "^3.0.0",
|
|
40
|
+
"vitest": "^1.0.0"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"mp4box": "^2.3.0",
|
|
44
|
+
"stinky-moq-js": ">=0.1.18",
|
|
45
|
+
"tinyh264": "^0.0.7"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"video",
|
|
49
|
+
"streaming",
|
|
50
|
+
"webcodecs",
|
|
51
|
+
"moq",
|
|
52
|
+
"media-over-quic",
|
|
53
|
+
"live-video"
|
|
54
|
+
],
|
|
55
|
+
"author": "",
|
|
56
|
+
"license": "MIT"
|
|
57
|
+
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FrameScheduler Tests
|
|
3
|
-
*
|
|
4
|
-
* Tests for the critical frame scheduling and buffering logic.
|
|
5
|
-
* The scheduler is responsible for:
|
|
6
|
-
* - Buffering frames to handle network jitter
|
|
7
|
-
* - Synchronizing stream time to real time
|
|
8
|
-
* - Detecting and correcting drift
|
|
9
|
-
* - Dropping frames appropriately when falling behind
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
package/dist/vitest.config.d.ts
DELETED