@phenixrts/sdk 2025.2.4-beta.663 → 2025.2.4-beta.664
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 +55 -0
- package/channels/debug/channels.js +1 -1
- package/channels/debug/package.json +1 -1
- package/channels/debug.private/channels.js +1 -1
- package/channels/debug.private/package.json +1 -1
- package/channels/debug.provideGlobalScope/channels.js +1 -1
- package/channels/debug.provideGlobalScope/package.json +1 -1
- package/channels/es5.debug.private/channels.js +1 -1
- package/channels/es5.debug.private/package.json +1 -1
- package/channels/min/channels.js +1 -1
- package/channels/min/package.json +1 -1
- package/channels/min.private/channels.js +1 -1
- package/channels/min.private/package.json +1 -1
- package/channels/min.provideGlobalScope/channels.js +1 -1
- package/channels/min.provideGlobalScope/package.json +1 -1
- package/channels/package.json +1 -1
- package/full/debug/full.js +1 -1
- package/full/debug/package.json +1 -1
- package/full/debug.private/full.js +1 -1
- package/full/debug.private/package.json +1 -1
- package/full/min/full.js +1 -1
- package/full/min/package.json +1 -1
- package/full/min.private/full.js +1 -1
- package/full/min.private/package.json +1 -1
- package/full/package.json +1 -1
- package/package.json +1 -1
- package/publish/debug/package.json +1 -1
- package/publish/debug/publish.js +1 -1
- package/publish/debug.private/package.json +1 -1
- package/publish/debug.private/publish.js +1 -1
- package/publish/min/package.json +1 -1
- package/publish/min/publish.js +1 -1
- package/publish/min.private/package.json +1 -1
- package/publish/min.private/publish.js +1 -1
- package/publish/package.json +1 -1
package/README.md
CHANGED
|
@@ -180,3 +180,58 @@ Weigh these points, because the choice is yours to make and the SDK will not mak
|
|
|
180
180
|
- The fetch sends every viewer's IP address, User-Agent and Referer to the CDN. Under GDPR you are the controller, so name the recipient in your privacy notice before you ship this.
|
|
181
181
|
- The CDN becomes an availability dependency of playback. If it is unreachable, chunked playback fails.
|
|
182
182
|
- A strict `script-src` policy, an offline deployment or an on-premise deployment will block the fetch. Bundle hls.js or mirror it on your own origin instead.
|
|
183
|
+
|
|
184
|
+
## Replay
|
|
185
|
+
|
|
186
|
+
Replay plays a bounded window of the recent past over a real-time channel, then returns to real-time. Every `Channel` exposes it as `channel.replay`.
|
|
187
|
+
|
|
188
|
+
Three things must be in place:
|
|
189
|
+
|
|
190
|
+
- The publisher publishes with the capabilities `on-demand` and `time-shift-manifest`.
|
|
191
|
+
- The viewer token carries the capability `replay`.
|
|
192
|
+
- A media player is available: an hls.js registered through `hlsJsLoader` (see "Providing hls.js"), or native HLS playback where the browser offers it.
|
|
193
|
+
|
|
194
|
+
`channel.replay.isSupported` answers the last two before any playback is attempted. It is observable because the token can be rotated on a running channel.
|
|
195
|
+
|
|
196
|
+
### Requesting a window
|
|
197
|
+
|
|
198
|
+
Address the window by start time and duration:
|
|
199
|
+
```
|
|
200
|
+
channel.replay.start({
|
|
201
|
+
startTime: Date.now() - 60000,
|
|
202
|
+
duration: 30000
|
|
203
|
+
}).then(function() {
|
|
204
|
+
console.log('Replaying', channel.replay.window.value);
|
|
205
|
+
}).catch(function(error) {
|
|
206
|
+
console.log('Refused:', error.reason);
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
channel.replay.returnToRealTime();
|
|
210
|
+
```
|
|
211
|
+
The platform serves a window from one recording that contains it in full, and caps a window at five minutes. The SDK does not shorten an over-long request; the platform refuses it and the reason is reported.
|
|
212
|
+
|
|
213
|
+
Replay cannot end closer than 8 seconds to now, because the segments at the live edge have not been written yet. If the requested end falls inside that gap, the SDK pulls the end back to 8 seconds behind real-time and leaves the start unchanged. `channel.replay.window` reports both the window that plays and the window that was requested, with `wasAdjusted` set when the end was moved.
|
|
214
|
+
|
|
215
|
+
### Observing a session
|
|
216
|
+
|
|
217
|
+
| Member | Meaning |
|
|
218
|
+
|---|---|
|
|
219
|
+
| `state` | `phenix.ReplayState`: `Idle`, `Loading`, `Playing`, `Ended`, `ReturningToRealTime`, or the refusal or failure the last session ended in. |
|
|
220
|
+
| `error` | Why the last session was refused or failed, or `null`. Set for every refusal, before the promise rejects. |
|
|
221
|
+
| `isReplaying` | Whether a replay session currently presents over the application video element. |
|
|
222
|
+
| `window` | The window that is playing, or `null`. |
|
|
223
|
+
| `autoMuted` | Whether the browser required the replay element to be muted before it would play. |
|
|
224
|
+
|
|
225
|
+
A rejection from `start()` carries the same reason on `error.reason`, and the internal status word on `error.status`. That word is the platform's own status, or the client's own refusal (for example `already-replaying` or `unsupported-feature`).
|
|
226
|
+
|
|
227
|
+
### What happens to your video element
|
|
228
|
+
|
|
229
|
+
Replay never takes the application video element. The real-time stream stays bound to it and keeps playing. The SDK creates a second video element for the session, marked `data-phenix-replay="true"`, positions it over the real-time picture, and removes it when the session ends. The application element is muted for the duration of the session and gets its previous muted state back afterwards; its volume is not touched.
|
|
230
|
+
|
|
231
|
+
The replay element inherits `controls`, `muted` and `volume` from the application element. The whole window stays seekable on it for the life of the session. Give the application element a positioned parent (`position: relative` is enough) so the replay element can be laid over it.
|
|
232
|
+
|
|
233
|
+
When the window ends, or `returnToRealTime()` is called, real-time presentation resumes at once; the peer connection was never released. If the publisher stopped in the meantime, `state` becomes `RealTimeUnavailable` and `error` becomes `real-time-unavailable`.
|
|
234
|
+
|
|
235
|
+
Replay is available on a real-time `Channel` only. A chunked channel (a viewer token carrying `streaming` or `on-demand`), a `ProtectedChannel` and an `IsoBmffChannel` refuse with `unsupported-feature`.
|
|
236
|
+
|
|
237
|
+
`examples/src/channel-viewer-replay-example.html` carries a working viewer with a scrub bar and a session panel.
|
|
@@ -14330,7 +14330,7 @@ var VersionManager = /*#__PURE__*/function () {
|
|
|
14330
14330
|
key: "sdkVersion",
|
|
14331
14331
|
get: function get() {
|
|
14332
14332
|
try {
|
|
14333
|
-
return "2026-09-15T22:
|
|
14333
|
+
return "2026-09-15T22:26:58.419Z (2025.2.4-beta.664)";
|
|
14334
14334
|
} catch (e) {
|
|
14335
14335
|
return this._defaultVersion;
|
|
14336
14336
|
}
|
|
@@ -14085,7 +14085,7 @@ var VersionManager = /*#__PURE__*/function () {
|
|
|
14085
14085
|
key: "sdkVersion",
|
|
14086
14086
|
get: function get() {
|
|
14087
14087
|
try {
|
|
14088
|
-
return "2026-09-15T22:
|
|
14088
|
+
return "2026-09-15T22:26:58.419Z (2025.2.4-beta.664)";
|
|
14089
14089
|
} catch (e) {
|
|
14090
14090
|
return this._defaultVersion;
|
|
14091
14091
|
}
|
|
@@ -13960,7 +13960,7 @@ var VersionManager = /*#__PURE__*/function () {
|
|
|
13960
13960
|
key: "sdkVersion",
|
|
13961
13961
|
get: function get() {
|
|
13962
13962
|
try {
|
|
13963
|
-
return "2026-09-15T22:
|
|
13963
|
+
return "2026-09-15T22:26:58.419Z (2025.2.4-beta.664)";
|
|
13964
13964
|
} catch (e) {
|
|
13965
13965
|
return this._defaultVersion;
|
|
13966
13966
|
}
|
|
@@ -13375,7 +13375,7 @@ var VersionManager = /*#__PURE__*/function () {
|
|
|
13375
13375
|
key: "sdkVersion",
|
|
13376
13376
|
get: function get() {
|
|
13377
13377
|
try {
|
|
13378
|
-
return "2026-09-15T22:
|
|
13378
|
+
return "2026-09-15T22:26:58.419Z (2025.2.4-beta.664)";
|
|
13379
13379
|
} catch (e) {
|
|
13380
13380
|
return this._defaultVersion;
|
|
13381
13381
|
}
|