@meshstream/p2p-web 1.0.2 → 1.0.4
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/adapters.js +1 -1
- package/dist/advanced.js +1 -1
- package/dist/index.js +1 -1
- package/dist/player.d.ts +9 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/player.d.ts
CHANGED
|
@@ -88,6 +88,7 @@ export interface HlsLike {
|
|
|
88
88
|
loadSource(url: string): void;
|
|
89
89
|
attachMedia(video: HTMLMediaElement): void;
|
|
90
90
|
on(event: string, listener: (...args: unknown[]) => void): void;
|
|
91
|
+
off?(event: string, listener: (...args: unknown[]) => void): void;
|
|
91
92
|
destroy(): void;
|
|
92
93
|
}
|
|
93
94
|
export declare class MeshStreamHlsPlayer {
|
|
@@ -122,6 +123,12 @@ export declare class MeshStreamHlsPlayer {
|
|
|
122
123
|
private readonly eventListeners;
|
|
123
124
|
/** Emits zero/CDN counters when bootstrap or P2P setup falls back to CDN. */
|
|
124
125
|
private fallbackStatsTimer?;
|
|
126
|
+
/** Counts CDN fragment traffic when bootstrap is still pending. */
|
|
127
|
+
private readonly cdnStats;
|
|
128
|
+
private cdnStatsHls?;
|
|
129
|
+
private readonly cdnFragLoadingHandler;
|
|
130
|
+
private readonly cdnFragLoadedHandler;
|
|
131
|
+
private readonly cdnFragLoadErrorHandler;
|
|
125
132
|
private playbackState;
|
|
126
133
|
private readonly lifecycle;
|
|
127
134
|
private startPromise?;
|
|
@@ -157,6 +164,8 @@ export declare class MeshStreamHlsPlayer {
|
|
|
157
164
|
private createServiceWorkerP2pEngine;
|
|
158
165
|
private resolveServiceWorkerSwarmId;
|
|
159
166
|
private startCdnFallback;
|
|
167
|
+
private bindCdnStats;
|
|
168
|
+
private unbindCdnStats;
|
|
160
169
|
private attachHls;
|
|
161
170
|
private autoplay;
|
|
162
171
|
private canPlayNativeHls;
|
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.4";
|
|
3
3
|
/** Returns the version of the Web MeshStream SDK loaded by this page. */
|
|
4
4
|
export declare function getSdkVersion(): string;
|