@meshstream/p2p-web 1.0.1 → 1.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 +12 -2
- package/dist/adapters.js +1 -1
- package/dist/advanced.js +1 -1
- package/dist/config.d.ts +19 -0
- package/dist/dash.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/player.d.ts +6 -2
- package/dist/report.d.ts +2 -0
- package/dist/rx-player.d.ts +4 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/player.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ import { type MeshStreamServiceWorkerP2pDiagnostics } from "./service-worker-p2p
|
|
|
9
9
|
import { type MeshStreamQoeSnapshot } from "./qoe.js";
|
|
10
10
|
export type MeshStreamPlaybackMode = "p2p-hls" | "sw-hls-p2p" | "sw-hls-cdn" | "cdn-hls" | "native-hls-cdn" | "sw-direct-p2p" | "sw-direct-cdn" | "cdn-direct" | "unsupported";
|
|
11
11
|
export type MeshStreamTransportPreference = "auto" | "mse" | "service-worker" | "cdn";
|
|
12
|
-
export type MeshStreamP2pFallbackReason = "CAPABILITY_UNSUPPORTED" | "P2P_DISABLED" | "SDK_CONFIG_UNAVAILABLE" | "KEY_P2P_DISABLED" | "QUOTA_EXHAUSTED" | "QUOTA_DISABLED" | "TRACKER_UNAVAILABLE" | "P2P_INITIALIZATION_FAILED";
|
|
12
|
+
export type MeshStreamP2pFallbackReason = "CAPABILITY_UNSUPPORTED" | "P2P_DISABLED" | "SDK_CONFIG_PENDING" | "SDK_CONFIG_UNAVAILABLE" | "KEY_P2P_DISABLED" | "QUOTA_EXHAUSTED" | "QUOTA_DISABLED" | "TRACKER_UNAVAILABLE" | "P2P_INITIALIZATION_FAILED";
|
|
13
13
|
export declare function toP2pUnavailableReason(fallbackReason: MeshStreamP2pFallbackReason | undefined): P2pUnavailableReason | undefined;
|
|
14
|
-
export declare function sdkConfigFallbackReason(config: SdkConfigResponse | undefined): MeshStreamP2pFallbackReason;
|
|
14
|
+
export declare function sdkConfigFallbackReason(config: SdkConfigResponse | undefined, pending?: boolean): MeshStreamP2pFallbackReason;
|
|
15
15
|
export interface MeshStreamServiceWorkerTransportOptions extends Omit<MeshStreamServiceWorkerRegistrationOptions, "registration"> {
|
|
16
16
|
autoRegister?: boolean;
|
|
17
17
|
p2pTimeoutMs?: number;
|
|
@@ -120,6 +120,8 @@ export declare class MeshStreamHlsPlayer {
|
|
|
120
120
|
private mode;
|
|
121
121
|
private p2pEnabledOverride?;
|
|
122
122
|
private readonly eventListeners;
|
|
123
|
+
/** Emits zero/CDN counters when bootstrap or P2P setup falls back to CDN. */
|
|
124
|
+
private fallbackStatsTimer?;
|
|
123
125
|
private playbackState;
|
|
124
126
|
private readonly lifecycle;
|
|
125
127
|
private startPromise?;
|
|
@@ -140,6 +142,8 @@ export declare class MeshStreamHlsPlayer {
|
|
|
140
142
|
private bindEventListeners;
|
|
141
143
|
private bindServiceWorkerEventListeners;
|
|
142
144
|
private completeFallbackStart;
|
|
145
|
+
private startFallbackStatsNotifications;
|
|
146
|
+
private stopFallbackStatsNotifications;
|
|
143
147
|
private removeEventListener;
|
|
144
148
|
private setPlaybackState;
|
|
145
149
|
private resolveQoePlaybackState;
|
package/dist/report.d.ts
CHANGED
|
@@ -132,6 +132,8 @@ export interface P2pReportPayload {
|
|
|
132
132
|
export declare const DEFAULT_REPORT_INTERVAL_MS = 30000;
|
|
133
133
|
export declare const MIN_REPORT_INTERVAL_MS = 20000;
|
|
134
134
|
export declare function normalizeReportIntervalMs(value: number | undefined): number;
|
|
135
|
+
/** Delay the first periodic report so a synchronized fleet does not burst. */
|
|
136
|
+
export declare function initialReportDelayMs(intervalMs: number): number;
|
|
135
137
|
export interface PostP2pReportOptions {
|
|
136
138
|
fetcher?: typeof fetch;
|
|
137
139
|
authorizationHeader?: string;
|
package/dist/rx-player.d.ts
CHANGED
|
@@ -135,6 +135,8 @@ export declare class MeshStreamRxPlayer {
|
|
|
135
135
|
private mode;
|
|
136
136
|
private p2pEnabledOverride?;
|
|
137
137
|
private readonly eventListeners;
|
|
138
|
+
/** Emits zero/CDN counters when RxPlayer runs without a P2P client. */
|
|
139
|
+
private fallbackStatsTimer?;
|
|
138
140
|
private playbackState;
|
|
139
141
|
private readonly lifecycle;
|
|
140
142
|
private startPromise?;
|
|
@@ -157,6 +159,8 @@ export declare class MeshStreamRxPlayer {
|
|
|
157
159
|
private createOriginSegmentLoader;
|
|
158
160
|
private completeFallbackStart;
|
|
159
161
|
private bindEventListeners;
|
|
162
|
+
private startFallbackStatsNotifications;
|
|
163
|
+
private stopFallbackStatsNotifications;
|
|
160
164
|
private removeEventListener;
|
|
161
165
|
private setPlaybackState;
|
|
162
166
|
private resolveQoePlaybackState;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** SDK release identifier attached to all Web usage reports. */
|
|
2
|
-
export declare const MESHSTREAM_WEB_SDK_VERSION = "1.0.
|
|
2
|
+
export declare const MESHSTREAM_WEB_SDK_VERSION = "1.0.2";
|
|
3
3
|
/** Returns the version of the Web MeshStream SDK loaded by this page. */
|
|
4
4
|
export declare function getSdkVersion(): string;
|