@phenixrts/sdk 2025.0.2 → 2025.0.4-beta.409

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 (48) hide show
  1. package/channels/debug/channels.js +1303 -1258
  2. package/channels/debug/package.json +1 -1
  3. package/channels/debug.private/channels.js +1216 -1171
  4. package/channels/debug.private/package.json +1 -1
  5. package/channels/debug.provideGlobalScope/channels.js +1275 -1230
  6. package/channels/debug.provideGlobalScope/package.json +1 -1
  7. package/channels/es5.debug.private/channels.js +75 -30
  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 +1556 -1404
  20. package/full/debug/package.json +1 -1
  21. package/full/debug.private/full.js +1469 -1317
  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 +1020 -869
  33. package/publish/debug.private/package.json +1 -1
  34. package/publish/debug.private/publish.js +1020 -869
  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 +1 -0
  43. package/types/globalScope/IGlobalScope.d.ts +1 -0
  44. package/types/globalScope/IWindow.d.ts +1 -0
  45. package/types/globalScope/ProvidedGlobalScope.d.ts +1 -0
  46. package/types/rtc/PeerConnectionService.d.ts +9 -3
  47. package/types/sdk/publish/PublisherContext.d.ts +7 -2
  48. package/types/sdk/publish/RealTimePublisher.d.ts +1 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phenixrts/sdk/publish",
3
- "version": "2025.0.2",
3
+ "version": "2025.0.4-beta.409",
4
4
  "files": [
5
5
  "min/"
6
6
  ],
@@ -16,6 +16,7 @@ export declare class GlobalScope implements IGlobalScope {
16
16
  static getInstance(): ReadOnlySubject<IGlobalScope>;
17
17
  static subscribe(callback: (value: IGlobalScope | null) => void): IDisposable;
18
18
  get FormData(): typeof FormData;
19
+ get HTMLVideoElement(): typeof HTMLVideoElement;
19
20
  get MediaStream(): typeof MediaStream;
20
21
  get MediaStreamTrack(): typeof MediaStreamTrack;
21
22
  get RTCPeerConnection(): typeof RTCPeerConnection;
@@ -1,6 +1,7 @@
1
1
  import INetworkInformation from './INetworkInformation';
2
2
  interface IGlobalScope {
3
3
  readonly FormData: typeof FormData;
4
+ readonly HTMLVideoElement: typeof HTMLVideoElement;
4
5
  readonly MediaStream: typeof MediaStream;
5
6
  readonly MediaStreamTrack: typeof MediaStreamTrack;
6
7
  readonly RTCPeerConnection: typeof RTCPeerConnection;
@@ -11,6 +11,7 @@ declare global {
11
11
  }
12
12
  interface IWindow {
13
13
  readonly FormData: typeof FormData;
14
+ readonly HTMLVideoElement: typeof HTMLVideoElement;
14
15
  readonly MediaStream: typeof MediaStream;
15
16
  readonly MediaStreamTrack: typeof MediaStreamTrack;
16
17
  readonly RTCPeerConnection: typeof RTCPeerConnection;
@@ -15,6 +15,7 @@ export declare class GlobalScope implements IGlobalScope {
15
15
  static getInstance(): ReadOnlySubject<IGlobalScope | null>;
16
16
  static subscribe(callback: (value: IGlobalScope | null) => void): IDisposable;
17
17
  get FormData(): typeof FormData;
18
+ get HTMLVideoElement(): typeof HTMLVideoElement;
18
19
  get MediaStream(): typeof MediaStream;
19
20
  get MediaStreamTrack(): typeof MediaStreamTrack;
20
21
  get RTCPeerConnection(): typeof RTCPeerConnection;
@@ -2,11 +2,16 @@ import Subject from '../rx/Subject';
2
2
  import IPeerConnection from './IPeerConnection';
3
3
  import IPeerConnectionFactory from './IPeerConnectionFactory';
4
4
  export interface IPeerConnectionOfferInit {
5
- audioTransceiver?: RTCRtpTransceiver;
6
- videoTransceiver?: RTCRtpTransceiver;
5
+ audioTransceivers?: RTCRtpTransceiver[];
6
+ videoTransceivers?: RTCRtpTransceiver[];
7
7
  peerConnection: IPeerConnection;
8
8
  localOffer: RTCSessionDescriptionInit;
9
9
  }
10
+ export declare enum EncodedInsertableStreams {
11
+ Disabled = 0,
12
+ Enabled = 1
13
+ }
14
+ export declare const defaultTrackKinds: ('audio' | 'video')[];
10
15
  export default class PeerConnectionService {
11
16
  private static _logger;
12
17
  private static readonly _peerConnectionFactory;
@@ -17,6 +22,7 @@ export default class PeerConnectionService {
17
22
  peerConnection: Promise<IPeerConnectionOfferInit | void>;
18
23
  direction: RTCRtpTransceiverDirection;
19
24
  }>;
20
- static createPeerConnectionOffer(direction?: RTCRtpTransceiverDirection, encodedInsertableStreams?: boolean): Promise<IPeerConnectionOfferInit>;
25
+ static createPeerConnectionOffer(direction?: RTCRtpTransceiverDirection, trackKinds?: ("audio" | "video")[], encodedInsertableStreams?: EncodedInsertableStreams): Promise<IPeerConnectionOfferInit>;
26
+ private static isTracksKindsEquivalentToDefault;
21
27
  private constructor();
22
28
  }
@@ -1,6 +1,6 @@
1
1
  import Subject from '../../rx/Subject';
2
2
  import PublisherState from './PublisherState';
3
- import EndPoint, { IStream } from '../discovery/EndPoint';
3
+ import EndPoint, { IStream, AddIceCandidatesStatus, SetRemoteDescriptionStatus } from '../discovery/EndPoint';
4
4
  import DisposableList from '../../lang/DisposableList';
5
5
  import { IRtcPublishMonitorStatistic } from '../../rtc/RtcPublishMonitor';
6
6
  import { PublishStatus } from '../api/Publish';
@@ -24,7 +24,12 @@ export default class PublisherContext {
24
24
  name: string;
25
25
  constructor(name?: string);
26
26
  get streamId(): string;
27
- applyStatus(status: PublishStatus): void;
27
+ applyPublishStatus(status: PublishStatus): void;
28
+ applySetRemoteDescriptionStatus(status: SetRemoteDescriptionStatus): void;
29
+ applyAddIceCandidatesStatus(status: AddIceCandidatesStatus): void;
28
30
  mapPublishStatusToPublisherStatus(status: PublishStatus): PublisherState;
31
+ applyUnhandledError(): void;
32
+ applyUnauthorized(): void;
33
+ applyNotFound(): void;
29
34
  private generateScreenName;
30
35
  }
@@ -11,4 +11,5 @@ export default class RealTimePublisher {
11
11
  private applyRtcConfiguration;
12
12
  private reconnectPeerConnection;
13
13
  private mapSetRemoteDescriptionStatusToPublisherStatus;
14
+ private mapAddIceCandidatesStatusToPublisherStatus;
14
15
  }