@vkontakte/calls-sdk 2.6.2-beta.16 → 2.6.2-beta.18

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.
@@ -38,6 +38,7 @@ export declare type ConversationData = {
38
38
  */
39
39
  acceptTime: number | null;
40
40
  features: ConversationFeature[];
41
+ featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
41
42
  /**
42
43
  * ID звонка
43
44
  */
@@ -108,7 +109,7 @@ export default class Conversation extends EventEmitter {
108
109
  static current(): Conversation | null;
109
110
  static hangupAfterInit(): void;
110
111
  static id(): string | null;
111
- onStart(opponentIds: OkUserId[], opponentType: CallType, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean): Promise<ConversationData>;
112
+ onStart(opponentIds: OkUserId[], opponentType: CallType, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
112
113
  onJoin(joinArgs: {
113
114
  conversationId?: string;
114
115
  mediaOptions: MediaOption[];
@@ -220,6 +221,7 @@ export default class Conversation extends EventEmitter {
220
221
  private _checkAdminRole;
221
222
  grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<void>;
222
223
  muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia?: MediaOption[]): Promise<void>;
224
+ enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
223
225
  pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<void>;
224
226
  updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
225
227
  changeOptions(changes: {
package/default/Api.d.ts CHANGED
@@ -16,8 +16,12 @@ export default class Api extends BaseApi {
16
16
  log(items: LogItem[]): void;
17
17
  init(): void;
18
18
  joinConversation(conversationId: string, isVideo?: boolean, chatId?: string): Promise<ConversationResponse>;
19
- createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean): Promise<ConversationResponse>;
20
- startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean): Promise<ConversationResponse>;
19
+ createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
20
+ onlyAdminCanShareMovie?: boolean;
21
+ }): Promise<ConversationResponse>;
22
+ startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
23
+ onlyAdminCanShareMovie?: boolean;
24
+ }): Promise<ConversationResponse>;
21
25
  private _preareStartConversationData;
22
26
  private _startConversation;
23
27
  createJoinLink(conversationId: string): Promise<{
@@ -2,6 +2,7 @@ import BaseSignaling, { AddParticipantParams } from '../abstract/BaseSignaling';
2
2
  import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
3
3
  import { PerfStatReport } from '../classes/transport/PerfStatReporter';
4
4
  import { TransportTopology } from '../classes/transport/Transport';
5
+ import ConversationFeature from '../enums/ConversationFeature';
5
6
  import ConversationOption from '../enums/ConversationOption';
6
7
  import MediaOption from '../enums/MediaOption';
7
8
  import RecordRole from '../enums/RecordRole';
@@ -112,6 +113,7 @@ export default class Signaling extends BaseSignaling {
112
113
  customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
113
114
  grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
114
115
  muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[]): Promise<SignalingMessage>;
116
+ enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
115
117
  pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<SignalingMessage>;
116
118
  updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
117
119
  changeOptions(changes: {
@@ -1,5 +1,6 @@
1
1
  declare const enum ConversationFeature {
2
2
  ADD_PARTICIPANT = "ADD_PARTICIPANT",
3
- RECORD = "RECORD"
3
+ RECORD = "RECORD",
4
+ MOVIE_SHARE = "MOVIE_SHARE"
4
5
  }
5
6
  export default ConversationFeature;
@@ -24,6 +24,7 @@ declare enum SignalingCommandType {
24
24
  CUSTOM_DATA = "custom-data",
25
25
  GRANT_ROLES = "grant-roles",
26
26
  MUTE_PARTICIPANT = "mute-participant",
27
+ ENABLE_FEATURE_FOR_ROLES = "enable-feature-for-roles",
27
28
  PIN_PARTICIPANT = "pin-participant",
28
29
  UPDATE_MEDIA_MODIFIERS = "update-media-modifiers",
29
30
  CHANGE_OPTIONS = "change-options",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.6.2-beta.16",
3
+ "version": "2.6.2-beta.18",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -74,6 +74,7 @@ declare namespace SignalingMessage {
74
74
  multichatId: string | null;
75
75
  tamtamMultichatId: string | null;
76
76
  recordInfo: RecordInfo | null;
77
+ featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
77
78
  pinnedParticipantId: ParticipantId | null;
78
79
  options: ConversationOption[];
79
80
  muteStates?: MuteStates;
@@ -188,6 +189,7 @@ declare namespace SignalingMessage {
188
189
  }
189
190
  export interface FeatureSetChanged extends Notification {
190
191
  features: ConversationFeature[];
192
+ featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
191
193
  }
192
194
  export interface MultipartyChatCreated extends Notification {
193
195
  chatId: string;