@phenixrts/sdk 2025.2.4-beta.616 → 2025.2.4-beta.618

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.
Files changed (49) hide show
  1. package/channels/debug/channels.js +267 -268
  2. package/channels/debug/package.json +1 -1
  3. package/channels/debug.private/channels.js +267 -268
  4. package/channels/debug.private/package.json +1 -1
  5. package/channels/debug.provideGlobalScope/channels.js +267 -268
  6. package/channels/debug.provideGlobalScope/package.json +1 -1
  7. package/channels/es5.debug.private/channels.js +262 -269
  8. package/channels/es5.debug.private/package.json +1 -1
  9. package/channels/min/channels.js +1 -1
  10. package/channels/min/channels.js.map +1 -1
  11. package/channels/min/package.json +1 -1
  12. package/channels/min.private/channels.js +1 -1
  13. package/channels/min.private/channels.js.map +1 -1
  14. package/channels/min.private/package.json +1 -1
  15. package/channels/min.provideGlobalScope/channels.js +1 -1
  16. package/channels/min.provideGlobalScope/channels.js.map +1 -1
  17. package/channels/min.provideGlobalScope/package.json +1 -1
  18. package/channels/package.json +1 -1
  19. package/full/debug/full.js +267 -268
  20. package/full/debug/package.json +1 -1
  21. package/full/debug.private/full.js +267 -268
  22. package/full/debug.private/package.json +1 -1
  23. package/full/min/full.js +1 -1
  24. package/full/min/full.js.map +1 -1
  25. package/full/min/package.json +1 -1
  26. package/full/min.private/full.js +1 -1
  27. package/full/min.private/full.js.map +1 -1
  28. package/full/min.private/package.json +1 -1
  29. package/full/package.json +1 -1
  30. package/package.json +1 -1
  31. package/publish/debug/package.json +1 -1
  32. package/publish/debug/publish.js +267 -268
  33. package/publish/debug.private/package.json +1 -1
  34. package/publish/debug.private/publish.js +267 -268
  35. package/publish/min/package.json +1 -1
  36. package/publish/min/publish.js +1 -1
  37. package/publish/min/publish.js.map +1 -1
  38. package/publish/min.private/package.json +1 -1
  39. package/publish/min.private/publish.js +1 -1
  40. package/publish/min.private/publish.js.map +1 -1
  41. package/publish/package.json +1 -1
  42. package/types/globalScope/GlobalScope.d.ts +2 -0
  43. package/types/globalScope/IGlobalScope.d.ts +2 -0
  44. package/types/globalScope/INavigator.d.ts +1 -1
  45. package/types/globalScope/IWindow.d.ts +1 -0
  46. package/types/globalScope/ProvidedGlobalScope.d.ts +2 -0
  47. package/types/sdk/api/Publish.d.ts +1 -0
  48. package/types/sdk/api/Subscribe.d.ts +1 -1
  49. package/types/sdk/discovery/EndPoint.d.ts +7 -5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phenixrts/sdk/publish",
3
- "version": "2025.2.4-beta.616",
3
+ "version": "2025.2.4-beta.618",
4
4
  "files": [
5
5
  "min/"
6
6
  ],
@@ -15,6 +15,7 @@ export declare class GlobalScope implements IGlobalScope {
15
15
  static setInstance(providedGlobalScope: IProvidedGlobalScope): void;
16
16
  static getInstance(): ReadOnlySubject<IGlobalScope>;
17
17
  static subscribe(callback: (value: IGlobalScope | null) => void): IDisposable;
18
+ get AbortController(): typeof AbortController;
18
19
  get FormData(): typeof FormData;
19
20
  get HTMLVideoElement(): typeof HTMLVideoElement;
20
21
  get MediaStream(): typeof MediaStream;
@@ -39,6 +40,7 @@ export declare class GlobalScope implements IGlobalScope {
39
40
  get navigatorConnection(): INetworkInformation | undefined;
40
41
  get navigatorIsOnLine(): boolean;
41
42
  get pageLoadTime(): number | undefined;
43
+ get sendBeacon(): ((url: string | URL, data?: BodyInit | null) => boolean) | undefined;
42
44
  get queueMicrotask(): (microtask: () => void) => void;
43
45
  get removeDocumentEventListener(): (type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions) => void;
44
46
  get requestAnimationFrame(): (callback: FrameRequestCallback) => number;
@@ -1,5 +1,6 @@
1
1
  import INetworkInformation from './INetworkInformation';
2
2
  interface IGlobalScope {
3
+ readonly AbortController: typeof AbortController;
3
4
  readonly FormData: typeof FormData;
4
5
  readonly HTMLVideoElement: typeof HTMLVideoElement;
5
6
  readonly MediaStream: typeof MediaStream;
@@ -24,6 +25,7 @@ interface IGlobalScope {
24
25
  readonly clearTimeout: (id?: number | undefined) => void;
25
26
  readonly documentQuerySelector: <Element extends HTMLElement>(selector: string) => Element | null;
26
27
  readonly fetch: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
28
+ readonly sendBeacon?: (url: string | URL, data?: BodyInit | null) => boolean;
27
29
  readonly queueMicrotask: (microTask: () => void) => void;
28
30
  readonly removeDocumentEventListener: (type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions) => void;
29
31
  readonly requestAnimationFrame: (callback: FrameRequestCallback) => number;
@@ -3,6 +3,6 @@ interface INavigator {
3
3
  readonly onLine: boolean;
4
4
  readonly userAgent?: string;
5
5
  readonly connection?: INetworkInformation;
6
- readonly sendBeacon: (url: string | URL, data: BodyInit | string | null) => boolean;
6
+ readonly sendBeacon?: (url: string | URL, data: BodyInit | string | null) => boolean;
7
7
  }
8
8
  export default INavigator;
@@ -10,6 +10,7 @@ declare global {
10
10
  }
11
11
  }
12
12
  interface IWindow {
13
+ readonly AbortController: typeof AbortController;
13
14
  readonly FormData: typeof FormData;
14
15
  readonly HTMLVideoElement: typeof HTMLVideoElement;
15
16
  readonly MediaStream: typeof MediaStream;
@@ -14,6 +14,7 @@ export declare class GlobalScope implements IGlobalScope {
14
14
  static setInstance(providedGlobalScope: IProvidedGlobalScope): void;
15
15
  static getInstance(): ReadOnlySubject<IGlobalScope | null>;
16
16
  static subscribe(callback: (value: IGlobalScope | null) => void): IDisposable;
17
+ get AbortController(): typeof AbortController;
17
18
  get FormData(): typeof FormData;
18
19
  get HTMLVideoElement(): typeof HTMLVideoElement;
19
20
  get MediaStream(): typeof MediaStream;
@@ -38,6 +39,7 @@ export declare class GlobalScope implements IGlobalScope {
38
39
  get navigatorConnection(): INetworkInformation | undefined;
39
40
  get navigatorIsOnLine(): boolean;
40
41
  get pageLoadTime(): number | undefined;
42
+ get sendBeacon(): ((url: string | URL, data?: BodyInit | null) => boolean) | undefined;
41
43
  get queueMicrotask(): (microtask: () => void) => void;
42
44
  get removeDocumentEventListener(): (type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions) => void;
43
45
  get requestAnimationFrame(): (callback: FrameRequestCallback) => number;
@@ -36,6 +36,7 @@ export interface IPublishSuccessResponse {
36
36
  createAnswerDescriptionResponse?: {
37
37
  sessionDescription: RTCSessionDescription;
38
38
  };
39
+ streamResponseContext?: Record<string, unknown>;
39
40
  }
40
41
  export interface IPublishResponse {
41
42
  status: 'not-found' | 'geo-restricted' | 'geo-blocked' | 'unauthorized' | 'rate-limited' | 'capacity' | 'timeout' | 'forbidden-tag' | 'missing-channel-or-room-id' | 'port-in-range-not-found' | 'failed';
@@ -33,7 +33,7 @@ export interface ISubscribeSuccessResponse {
33
33
  createAnswerDescriptionResponse?: {
34
34
  sessionDescription: RTCSessionDescription;
35
35
  };
36
- [key: string]: unknown;
36
+ streamResponseContext?: Record<string, unknown>;
37
37
  }
38
38
  export interface ISubscribeFailureResponse {
39
39
  status: SubscribeStatus;
@@ -92,17 +92,19 @@ export default class EndPoint {
92
92
  destroyStreamOnUnmount(stream: IStream, reason: string): Promise<void>;
93
93
  private buildUrl;
94
94
  private buildPingUrl;
95
+ private parseJsonBody;
96
+ private handleStreamResponseContext;
95
97
  private mapHttpStatusToPublishStatus;
96
98
  private mapHttpStatusToSubscribeStatus;
97
99
  private mapHttpStatusToSetRemoteDescriptionStatus;
98
100
  private mapHttpStatusToSetTemporaryMaximalBitrateStatus;
99
101
  private mapHttpStatusToAddIceCandidatesStatus;
100
102
  private mapHttpStatusToSetDestroyStreamStatus;
101
- private convertHttpResponseToSubscribeResponse;
102
- private convertHttpResponseToPublishResponse;
103
+ private normalizeSubscribeResponse;
104
+ private normalizePublishResponse;
103
105
  private convertIRtcConfigurationToRTCConfiguration;
104
- private convertHttpResponseToSetRemoteDescriptionResponse;
105
- private convertHttpResponseToAddIceCandidatesResponse;
106
- private convertHttpResponseToDestroyStreamResponse;
106
+ private convertHttpResponseToSetRemoteDescription;
107
+ private convertHttpResponseToAddIceCandidates;
108
+ private convertHttpResponseToDestroyStream;
107
109
  }
108
110
  export {};