@7365admin1/layer-common 4.58.1 → 4.58.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/CHANGELOG.md +10 -4
- package/package.json +1 -1
- package/utils/robot-control.ts +26 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.58.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 40a1da2: Robot live view (PadBot S2): the camera's stray H.264 delimiters are now rewritten into real H.265 access-unit delimiters (after a 4-byte start code). The S2 sends VPS/SPS/PPS each in its own PES; without an H.265 delimiter hls.js 1.7.3 dropped the PPS from the init segment and Chrome decoded 0 frames (black picture, clock running).
|
|
8
|
+
|
|
3
9
|
## 4.58.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1624,11 +1630,11 @@
|
|
|
1624
1630
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
1625
1631
|
own rule from two endpoints the console already calls, unprojected:
|
|
1626
1632
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1633
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
1634
|
+
GET /api/roles/id/:role that membership's role document
|
|
1629
1635
|
|
|
1630
|
-
|
|
1631
|
-
|
|
1636
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
1637
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
1632
1638
|
|
|
1633
1639
|
`role.default` is the marker because it is the only property of a platform
|
|
1634
1640
|
staff role no API caller can set - `role.controller.ts` validates create and
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.58.
|
|
5
|
+
"version": "4.58.2",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|
package/utils/robot-control.ts
CHANGED
|
@@ -78,9 +78,20 @@ export type THlsCtor = { isSupported(): boolean; new (config?: Record<string, un
|
|
|
78
78
|
* with these units removed Chrome's own decoder decodes 40/40 frames.
|
|
79
79
|
*
|
|
80
80
|
* Rewrites each such header in place, inside the TS packets of video PIDs
|
|
81
|
-
* only,
|
|
82
|
-
* ignore. Same length, so the TS stays intact. A valid single-layer H.265
|
|
81
|
+
* only. Same length, so the TS stays intact. A valid single-layer H.265
|
|
83
82
|
* header never matches (its temporal id is never 0). Returns the count.
|
|
83
|
+
*
|
|
84
|
+
* - After a 4-byte start code (the real S2 stream) it becomes a real H.265
|
|
85
|
+
* access-unit delimiter (type 35). This matters: the S2 sends every
|
|
86
|
+
* parameter set (VPS, SPS, PPS) in its own PES packet. Without an H.265
|
|
87
|
+
* delimiter hls.js 1.7.3 treats each PES as a new picture, and its HEVC
|
|
88
|
+
* parser forgets the VPS on every picture push (initVPS = null), so the PPS
|
|
89
|
+
* is never stored and the hvcC it writes has no PPS: Chrome then decodes
|
|
90
|
+
* 0 frames with no error - time runs, picture black (prod, 2026-09-26 late;
|
|
91
|
+
* the page's own hls.js decoded the real segments once the delimiter was a
|
|
92
|
+
* real one: 136 frames, PPS present).
|
|
93
|
+
* - After a 3-byte start code there is no spare byte: an "unspecified" unit
|
|
94
|
+
* (type 48) that hls.js and decoders ignore.
|
|
84
95
|
*/
|
|
85
96
|
export function neutraliseStrayAud(data: ArrayBuffer | Uint8Array): number {
|
|
86
97
|
const b = data instanceof Uint8Array ? data : new Uint8Array(data);
|
|
@@ -107,8 +118,19 @@ export function neutraliseStrayAud(data: ArrayBuffer | Uint8Array): number {
|
|
|
107
118
|
const len = t + end - p;
|
|
108
119
|
for (let k = 0; k + 4 < len; k++) {
|
|
109
120
|
if (b[at(k)] === 0 && b[at(k + 1)] === 0 && b[at(k + 2)] === 1 && b[at(k + 3)] === 0x09 && (b[at(k + 4)]! & 7) === 0) {
|
|
110
|
-
b[at(k
|
|
111
|
-
|
|
121
|
+
if (k > 0 && b[at(k - 1)] === 0) {
|
|
122
|
+
// 4-byte start code (what the S2 sends): borrow its spare zero and
|
|
123
|
+
// write a REAL H.265 access-unit delimiter, 00 00 01 46 01 50.
|
|
124
|
+
b[at(k - 1)] = 0;
|
|
125
|
+
b[at(k)] = 0;
|
|
126
|
+
b[at(k + 1)] = 1;
|
|
127
|
+
b[at(k + 2)] = 0x46;
|
|
128
|
+
b[at(k + 3)] = 0x01;
|
|
129
|
+
b[at(k + 4)] = 0x50;
|
|
130
|
+
} else {
|
|
131
|
+
b[at(k + 3)] = 0x60;
|
|
132
|
+
b[at(k + 4)] = 0x01;
|
|
133
|
+
}
|
|
112
134
|
n++;
|
|
113
135
|
k += 4;
|
|
114
136
|
}
|