@rongcloud/plugin-call 5.0.5-alpha.1 → 5.0.8

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/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /*
2
- * RCCall - v5.0.5-alpha.1
3
- * CommitId - 92132946bea607c42e2d1fe5fe641bed05997834
4
- * Mon Dec 06 2021 16:29:43 GMT+0800 (China Standard Time)
2
+ * RCCall - v5.0.8
3
+ * CommitId - bc1d39aa3bab4f6c75022fd71d5cca325668e2c1
4
+ * Tue Jun 21 2022 17:42:09 GMT+0800 (China Standard Time)
5
5
  * ©2020 RongCloud, Inc. All rights reserved.
6
6
  */
7
7
  import { ConversationType, RTCJoinType, LogLevel, PluginContext, IRuntime, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
8
- import { RCCallStateMachine, RCCallErrorCode, RCCallMediaType, IUserData, RCCallUserState, RCCallSessionState, IEndSummary, IOfflineRecord, RCCallLanguage, RCCallEndReason, IInvitedUsers } from '@rongcloud/plugin-call-engine';
8
+ import { RCCallStateMachine, RCCallErrorCode, IInviteOptions, RCCallMediaType, IUserData, RCCallUserState, RCCallSessionState, IEndSummary, IOfflineRecord, RCCallLanguage, RCCallEndReason, IInvitedUsers } from '@rongcloud/plugin-call-engine';
9
9
  export { IEndSummary, IInvitedUsers, IOfflineRecord, ISenderInfo, RCCallEndReason, RCCallErrorCode, RCCallLanguage, RCCallMediaType, RCCallSessionState, RCCallUserState } from '@rongcloud/plugin-call-engine';
10
- import { RCRTCClient, IMicphoneAudioProfile, RCRTCRoom, RCTrack, RCRTCCode, IRCRTCStateReport, RCRTCPingResult, RCLocalTrack, ICameraVideoProfile } from '@rongcloud/plugin-rtc';
10
+ import { RCRTCClient, IMicphoneAudioProfile, RCTrack, RCRTCCode, IRCRTCStateReport, RCRTCPingResult, RCLocalTrack, ICameraVideoProfile } from '@rongcloud/plugin-rtc';
11
11
 
12
12
  /**
13
13
  * 产生session的场景
@@ -115,8 +115,11 @@ declare class RCCallSession {
115
115
  /**
116
116
  * 群呼叫中继续邀请
117
117
  * @param userIds 被邀请用户 ID 列表
118
+ * @param options.extra 消息的扩展信息
119
+ * @param options.pushTitle 通知的标题
120
+ * @param options.pushContent 通知内容
118
121
  */
119
- invite(userIds: string[]): Promise<{
122
+ invite(userIds: string[], options?: IInviteOptions): Promise<{
120
123
  code: RCCallErrorCode;
121
124
  }>;
122
125
  /**
@@ -205,7 +208,7 @@ declare class RCCallSession {
205
208
  /**
206
209
  * 获取房间当前会话 Id,当房间内已无成员时房间会回收,重新加入时 sessionId 将更新,(用户录制资源用的)
207
210
  */
208
- getRTCSessionId(): string;
211
+ getRTCSessionId(): string | null;
209
212
  /**
210
213
  * 目标 ID,单呼对方人员 Id, 群呼群组 Id
211
214
  */
@@ -238,10 +241,6 @@ declare class RCCallSession {
238
241
  * 获得mediaType
239
242
  */
240
243
  getMediaType(): RCCallMediaType;
241
- /**
242
- * 获取 RTC Room 实例
243
- */
244
- getRTCRoomInstance(): RCRTCRoom | null;
245
244
  }
246
245
 
247
246
  interface ISender {
@@ -284,7 +283,7 @@ interface IRCCallInitOptions {
284
283
  /**
285
284
  * 收到邀请后,产生新的session
286
285
  */
287
- onSession: (session: RCCallSession) => void;
286
+ onSession: (session: RCCallSession, extra?: string) => void;
288
287
  /**
289
288
  * session已关闭
290
289
  */
@@ -382,14 +381,6 @@ interface ISessionListener {
382
381
  * @since version 5.1.5
383
382
  */
384
383
  onICEConnectionStateChange?: (state: RTCIceConnectionState, session: RCCallSession) => void;
385
- /**
386
- * 接收到房间信令时回调
387
- */
388
- onMessageReceive?: (name: string, content: any, senderUserId: string, messageUId: string, session: RCCallSession) => void;
389
- /**
390
- * 监听房间属性变更通知
391
- */
392
- onRoomAttributeChange?: (name: string, content: string, session: RCCallSession) => void;
393
384
  }
394
385
  /**
395
386
  * 创建session的options
@@ -448,6 +439,18 @@ interface IRCCallParams {
448
439
  video?: ICameraVideoProfile;
449
440
  audio: IMicphoneAudioProfile;
450
441
  };
442
+ /**
443
+ * 消息的扩展信息
444
+ */
445
+ extra?: string;
446
+ /**
447
+ * 对方显示通知的标题
448
+ */
449
+ pushTitle?: string;
450
+ /**
451
+ * 对方显示的通知内容
452
+ */
453
+ pushContent?: string;
451
454
  }
452
455
  interface IMediaStreamConstraints {
453
456
  video?: ICameraVideoProfile;
@@ -464,8 +467,26 @@ interface IRCCallInGroupParams {
464
467
  * session上要注册的监听事件
465
468
  */
466
469
  listener: ISessionListener;
470
+ /**
471
+ * 组织 Id,可选
472
+ */
467
473
  channelId?: string;
474
+ /**
475
+ * 用于获取己方媒体资源的参数
476
+ */
468
477
  constraints?: IMediaStreamConstraints;
478
+ /**
479
+ * 消息的扩展信息
480
+ */
481
+ extra?: string;
482
+ /**
483
+ * 对方显示通知的标题
484
+ */
485
+ pushTitle?: string;
486
+ /**
487
+ * 对方显示的通知内容
488
+ */
489
+ pushContent?: string;
469
490
  }
470
491
  interface IDeviceChangeParams {
471
492
  audio?: IMicphoneAudioProfile;
@@ -519,8 +540,11 @@ declare class RCCallClient {
519
540
  * @param params.listener (session上的监听) 必填
520
541
  * @param params.constraints 获取音频或音视频资源时的参数 可选
521
542
  * @param params.channelId 组织 Id 可选
543
+ * @param params.extra 消息扩展信息
544
+ * @param params.pushTitle 通知的标题
545
+ * @param params.pushContent 通知的内容
522
546
  */
523
- call({ targetId, mediaType, listener, constraints, channelId }: IRCCallParams): Promise<{
547
+ call({ targetId, mediaType, listener, constraints, channelId, extra, pushTitle, pushContent }: IRCCallParams): Promise<{
524
548
  code: RCCallErrorCode;
525
549
  session?: RCCallSession;
526
550
  }>;
@@ -530,10 +554,13 @@ declare class RCCallClient {
530
554
  * @param params.userIds 被呼叫的群内成员 Id 必填
531
555
  * @param params.mediaType 音频呼叫 or 音视频呼叫 必填
532
556
  * @param params.listener (session上的监听) 必填
533
- * @param params.channelId 组织 Id 可选
534
557
  * @param params.constraints 获取音频或音视频资源时的参数 可选
558
+ * @param params.channelId 组织 Id 可选
559
+ * @param params.extra 消息扩展信息 可选
560
+ * @param params.pushTitle 通知的标题
561
+ * @param params.pushContent 通知的内容
535
562
  */
536
- callInGroup({ targetId, userIds, mediaType, listener, constraints, channelId }: IRCCallInGroupParams): Promise<{
563
+ callInGroup({ targetId, userIds, mediaType, listener, constraints, channelId, extra, pushTitle, pushContent }: IRCCallInGroupParams): Promise<{
537
564
  code: RCCallErrorCode;
538
565
  session?: RCCallSession;
539
566
  }>;
@@ -547,10 +574,9 @@ declare class RCCallClient {
547
574
  */
548
575
  private _removeSession;
549
576
  /**
550
- * 获取加入通话(已加入 RTC 房间)的用户信息
551
- * @param userId 用户 ID
577
+ * 获取己方其他端加入通话(已加入 RTC 房间)的用户信息
552
578
  */
553
- getJoinedUserInfo(userId: string): Promise<{
579
+ getJoinedRoomInfo(): Promise<{
554
580
  code: RCCallErrorCode;
555
581
  data?: IRTCJoinedInfo[];
556
582
  }>;