@mebius-io/web 0.5.1 → 0.5.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/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +10 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -43047,6 +43047,7 @@ Schedule: ${scheduleItems.map((seg) => segmentToString(seg))} pos: ${this.timeli
|
|
|
43047
43047
|
var MAX_DRIFT_S = 2;
|
|
43048
43048
|
var EDGE_MARGIN_S = 0.4;
|
|
43049
43049
|
var AUDIO_RETRY_MS = 2500;
|
|
43050
|
+
var ESTIMATED_LATENCY_MS = 3e3;
|
|
43050
43051
|
function stalledWithData(video, ms) {
|
|
43051
43052
|
if (video.currentTime > 0) return Promise.resolve(false);
|
|
43052
43053
|
return new Promise((resolve) => {
|
|
@@ -43175,6 +43176,15 @@ Schedule: ${scheduleItems.map((seg) => segmentToString(seg))} pos: ${this.timeli
|
|
|
43175
43176
|
}
|
|
43176
43177
|
return { bitrateKbps, framesPerSecond, latencyMs: void 0 };
|
|
43177
43178
|
}
|
|
43179
|
+
/**
|
|
43180
|
+
* Estimate only — see {@link ESTIMATED_LATENCY_MS}. Without this, captions
|
|
43181
|
+
* never render on the FLV route at all: {@link MebiusCaptions} withholds
|
|
43182
|
+
* every segment until the playhead reaches its `epochMs`, and a transport
|
|
43183
|
+
* returning `null` here means the playhead comparison never runs.
|
|
43184
|
+
*/
|
|
43185
|
+
playheadEpochMs() {
|
|
43186
|
+
return Date.now() - ESTIMATED_LATENCY_MS;
|
|
43187
|
+
}
|
|
43178
43188
|
};
|
|
43179
43189
|
|
|
43180
43190
|
// src/internal/transport.ts
|