@streamyy/client 0.2.0 → 0.4.0

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 (41) hide show
  1. package/README.md +4 -4
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/client.d.ts +6 -6
  4. package/dist/client.js +3 -3
  5. package/dist/components/CallControls.d.ts +9 -1
  6. package/dist/components/CallControls.d.ts.map +1 -1
  7. package/dist/components/CallControls.js +13 -8
  8. package/dist/components/CallControls.js.map +1 -1
  9. package/dist/components/IncomingCallCard.d.ts +7 -3
  10. package/dist/components/IncomingCallCard.d.ts.map +1 -1
  11. package/dist/components/IncomingCallCard.js +18 -25
  12. package/dist/components/IncomingCallCard.js.map +1 -1
  13. package/dist/components/StreammyCallWidget.d.ts +17 -2
  14. package/dist/components/StreammyCallWidget.d.ts.map +1 -1
  15. package/dist/components/StreammyCallWidget.js +220 -119
  16. package/dist/components/StreammyCallWidget.js.map +1 -1
  17. package/dist/components/StreamyyCallWidget.d.ts +27 -0
  18. package/dist/components/StreamyyCallWidget.d.ts.map +1 -0
  19. package/dist/components/StreamyyCallWidget.js +347 -0
  20. package/dist/components/StreamyyCallWidget.js.map +1 -0
  21. package/dist/components/VideoStage.d.ts.map +1 -1
  22. package/dist/components/VideoStage.js +12 -48
  23. package/dist/components/VideoStage.js.map +1 -1
  24. package/dist/components/VideoTile.d.ts +1 -1
  25. package/dist/components/VideoTile.d.ts.map +1 -1
  26. package/dist/components/VideoTile.js +18 -14
  27. package/dist/components/VideoTile.js.map +1 -1
  28. package/dist/hooks/useRingtone.d.ts +2 -2
  29. package/dist/hooks/useRingtone.d.ts.map +1 -1
  30. package/dist/hooks/useRingtone.js +11 -7
  31. package/dist/hooks/useRingtone.js.map +1 -1
  32. package/dist/hooks/useStreamyy.d.ts +28 -0
  33. package/dist/hooks/useStreamyy.d.ts.map +1 -0
  34. package/dist/hooks/useStreamyy.js +533 -0
  35. package/dist/hooks/useStreamyy.js.map +1 -0
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.js +2 -2
  38. package/dist/types.d.ts +30 -30
  39. package/dist/webrtc/peer-session.d.ts +3 -3
  40. package/dist/webrtc/peer-session.js +1 -1
  41. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { CallSessionRecord, CallType, PresenceRecord } from "@streamyy/core";
2
2
  import type { ReactNode } from "react";
3
- export interface StreammyClientOptions {
3
+ export interface StreamyyClientOptions {
4
4
  url: string;
5
5
  token?: string;
6
6
  userId: string;
@@ -14,7 +14,7 @@ export interface StreammyClientOptions {
14
14
  reconnectionDelayMaxMs?: number;
15
15
  connectionTimeoutMs?: number;
16
16
  }
17
- export interface StreammyIncomingCall {
17
+ export interface StreamyyIncomingCall {
18
18
  callId: string;
19
19
  callerId: string;
20
20
  receiverId: string;
@@ -22,14 +22,14 @@ export interface StreammyIncomingCall {
22
22
  status: CallSessionRecord["status"];
23
23
  metadata?: Record<string, unknown>;
24
24
  }
25
- export interface StreammyCallAccepted {
25
+ export interface StreamyyCallAccepted {
26
26
  callId: string;
27
27
  acceptedBy: string;
28
28
  deviceId?: string;
29
29
  startedAt?: Date | string;
30
30
  status: CallSessionRecord["status"];
31
31
  }
32
- export interface StreammyCallEnded {
32
+ export interface StreamyyCallEnded {
33
33
  callId: string;
34
34
  endedBy: string;
35
35
  deviceId?: string;
@@ -38,47 +38,47 @@ export interface StreammyCallEnded {
38
38
  duration?: number;
39
39
  reason?: string;
40
40
  }
41
- export interface StreammySimpleCallEvent {
41
+ export interface StreamyySimpleCallEvent {
42
42
  callId: string;
43
43
  deviceId?: string;
44
44
  status: CallSessionRecord["status"];
45
45
  reason?: string;
46
46
  }
47
- export interface StreammySignalEvent {
47
+ export interface StreamyySignalEvent {
48
48
  callId: string;
49
49
  fromUserId: string;
50
50
  payload: Record<string, unknown>;
51
51
  }
52
- export interface StreammyClientEvents {
52
+ export interface StreamyyClientEvents {
53
53
  connected: void;
54
54
  disconnected: void;
55
55
  reconnecting: {
56
56
  attempt: number;
57
57
  };
58
58
  reconnected: void;
59
- incomingCall: StreammyIncomingCall;
59
+ incomingCall: StreamyyIncomingCall;
60
60
  callInitiated: CallSessionRecord;
61
- callAccepted: StreammyCallAccepted;
62
- callDeclined: StreammySimpleCallEvent;
63
- callCancelled: StreammySimpleCallEvent;
64
- callEnded: StreammyCallEnded;
65
- offer: StreammySignalEvent;
66
- answer: StreammySignalEvent;
67
- iceCandidate: StreammySignalEvent;
61
+ callAccepted: StreamyyCallAccepted;
62
+ callDeclined: StreamyySimpleCallEvent;
63
+ callCancelled: StreamyySimpleCallEvent;
64
+ callEnded: StreamyyCallEnded;
65
+ offer: StreamyySignalEvent;
66
+ answer: StreamyySignalEvent;
67
+ iceCandidate: StreamyySignalEvent;
68
68
  presenceUpdated: PresenceRecord;
69
69
  }
70
70
  export interface CallControlsState {
71
71
  muted: boolean;
72
72
  videoEnabled: boolean;
73
73
  }
74
- export type StreammyCallDirection = "incoming" | "outgoing";
75
- export interface StreammyActiveCall {
74
+ export type StreamyyCallDirection = "incoming" | "outgoing";
75
+ export interface StreamyyActiveCall {
76
76
  callId: string;
77
77
  callerId: string;
78
78
  receiverId: string;
79
79
  callType: CallType;
80
80
  status: CallSessionRecord["status"];
81
- direction: StreammyCallDirection;
81
+ direction: StreamyyCallDirection;
82
82
  metadata?: Record<string, unknown>;
83
83
  }
84
84
  export interface TonePatternStep {
@@ -90,7 +90,7 @@ export interface TonePattern {
90
90
  steps: TonePatternStep[];
91
91
  pauseMs?: number;
92
92
  }
93
- export type StreammyRingtoneSource = {
93
+ export type StreamyyRingtoneSource = {
94
94
  kind: "url";
95
95
  src: string;
96
96
  volume?: number;
@@ -99,11 +99,11 @@ export type StreammyRingtoneSource = {
99
99
  pattern: TonePattern;
100
100
  volume?: number;
101
101
  };
102
- export interface StreammyRingtoneSet {
103
- incoming?: StreammyRingtoneSource;
104
- outgoing?: StreammyRingtoneSource;
102
+ export interface StreamyyRingtoneSet {
103
+ incoming?: StreamyyRingtoneSource;
104
+ outgoing?: StreamyyRingtoneSource;
105
105
  }
106
- export interface StreammyCallMediaState {
106
+ export interface StreamyyCallMediaState {
107
107
  localStream: MediaStream | null;
108
108
  remoteStream: MediaStream | null;
109
109
  muted: boolean;
@@ -112,25 +112,25 @@ export interface StreammyCallMediaState {
112
112
  hasLocalVideo: boolean;
113
113
  hasRemoteVideo: boolean;
114
114
  }
115
- export interface StreammyIncomingCallRenderProps {
116
- call: StreammyActiveCall;
115
+ export interface StreamyyIncomingCallRenderProps {
116
+ call: StreamyyActiveCall;
117
117
  connected: boolean;
118
118
  reconnecting: boolean;
119
119
  accept(): Promise<void>;
120
120
  decline(reason?: string): Promise<void>;
121
121
  }
122
- export interface StreammyCallInterfaceRenderProps {
123
- activeCall: StreammyActiveCall;
122
+ export interface StreamyyCallInterfaceRenderProps {
123
+ activeCall: StreamyyActiveCall;
124
124
  callStatus: CallSessionRecord["status"] | "idle";
125
125
  connected: boolean;
126
126
  reconnecting: boolean;
127
- media: StreammyCallMediaState;
127
+ media: StreamyyCallMediaState;
128
128
  clear(): void;
129
129
  cancel(): Promise<void>;
130
130
  end(): Promise<void>;
131
131
  toggleMute(nextMuted?: boolean): void;
132
132
  toggleVideo(nextEnabled?: boolean): void;
133
133
  }
134
- export type StreammyIncomingCallRenderer = (props: StreammyIncomingCallRenderProps) => ReactNode;
135
- export type StreammyCallInterfaceRenderer = (props: StreammyCallInterfaceRenderProps) => ReactNode;
134
+ export type StreamyyIncomingCallRenderer = (props: StreamyyIncomingCallRenderProps) => ReactNode;
135
+ export type StreamyyCallInterfaceRenderer = (props: StreamyyCallInterfaceRenderProps) => ReactNode;
136
136
  //# sourceMappingURL=types.d.ts.map
@@ -1,11 +1,11 @@
1
- import type { StreammyClient } from "../client.js";
1
+ import type { StreamyyClient } from "../client.js";
2
2
  export interface PeerSessionOptions {
3
- client: StreammyClient;
3
+ client: StreamyyClient;
4
4
  callId: string;
5
5
  remoteUserId: string;
6
6
  rtcConfig?: RTCConfiguration;
7
7
  }
8
- export declare class StreammyPeerSession {
8
+ export declare class StreamyyPeerSession {
9
9
  private readonly options;
10
10
  readonly connection: RTCPeerConnection;
11
11
  constructor(options: PeerSessionOptions);
@@ -1,4 +1,4 @@
1
- export class StreammyPeerSession {
1
+ export class StreamyyPeerSession {
2
2
  options;
3
3
  connection;
4
4
  constructor(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamyy/client",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Frontend client, React hooks, UI components, and WebRTC helpers for Streamyy.",
5
5
  "license": "MIT",
6
6
  "type": "module",