@hysc/meeting 5.0.91 → 5.0.93

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.
@@ -4,6 +4,7 @@ import { BehaviorSubject, Subject } from "rxjs";
4
4
  import { Player } from "@hysc/core/esm";
5
5
  import BMStreamModelVM from "./BMStreamModelVM";
6
6
  import { BloudStreamState } from "../handleEvent/attachEvents";
7
+ import type { StreamCustomInfo } from '@hysc/bloud';
7
8
  /**
8
9
  * @name: BMStreamModel
9
10
  * @author: yangliye
@@ -151,6 +152,7 @@ export default class BMStreamModel {
151
152
  * @param forceSearch
152
153
  */
153
154
  updateBloudStream(streamState: BloudStreamState | undefined, bmStreamVM: BMStreamModelVM, forceSearch?: boolean): void;
155
+ updateBloudCustomInfo(customInfo: StreamCustomInfo): void;
154
156
  private onPlayerStateChange;
155
157
  handleStreamConnectError: () => void;
156
158
  /**
@@ -19,12 +19,14 @@ import BMUser from "../BMUser/BMUser";
19
19
  import { SingleLocalStream, SingleRemoteStream, SingleStream } from "../type";
20
20
  import BMRoom from "../BMRoom/BMRoom";
21
21
  import { BehaviorSubject, Subject } from "rxjs";
22
- import BoomError from "../error/RTCError";
22
+ import { BoomError } from "@hysc/utils";
23
23
  import { Device } from "@hysc/core/esm/BoomAdapter/type/value";
24
24
  import BMSpeaker from "./BMSpeaker";
25
25
  import { ShareMediaOptions } from "@hysc/core/esm/BoomCore/BCClient/BCClient";
26
26
  import { getHTMLMediaStreamOptions, getMediaStreamInfo, Result } from "./getHTMLMediaStreamOptions";
27
27
  import { BloudStream } from "@hysc/core";
28
+ import type { StreamCustomInfo } from '@hysc/bloud';
29
+ import { BloudStreamEventState } from "../handleEvent/attachEvents";
28
30
  export declare function transShareScreen2User(userId: string): string;
29
31
  export default class BMStreamModelVM {
30
32
  streamModels: Map<string, BMStreamModel>;
@@ -81,6 +83,10 @@ export default class BMStreamModelVM {
81
83
  * 共享屏幕流错误
82
84
  */
83
85
  localShareError: Subject<BoomError>;
86
+ /**
87
+ * 共享屏幕流是单独处理的逻辑,不是先创建streamModel然后在去查流,而是先去查流,在创建streamModel
88
+ */
89
+ shareBloudStateMap: Map<string, BloudStreamEventState>;
84
90
  constructor();
85
91
  private static filterStreamModels;
86
92
  initWithRoom(room: BMRoom): this;
@@ -160,6 +166,10 @@ export default class BMStreamModelVM {
160
166
  * @param enable
161
167
  */
162
168
  muteSpeaker(enable: boolean): Promise<undefined>;
169
+ /**
170
+ * 创建本地音频流
171
+ */
172
+ createLocalAudioStream(): Promise<void>;
163
173
  /**
164
174
  * 创建流并且发布
165
175
  * @param audio 是否发布音频流
@@ -246,5 +256,9 @@ export default class BMStreamModelVM {
246
256
  */
247
257
  getHTMLMediaStream: typeof getHTMLMediaStreamOptions;
248
258
  getMediaStream: typeof getMediaStreamInfo;
259
+ /**
260
+ * 更新流信息 会给服务端发送updateStream信令,会收到updateStream的广播
261
+ */
262
+ updateBloudStreamCustomStats(uid: string, streamId: string, streamInfo: StreamCustomInfo): Promise<any> | undefined;
249
263
  clearCache(): void;
250
264
  }
@@ -5,7 +5,7 @@
5
5
  * @description:AudioPlay.ts
6
6
  * @update: 2023-06-08 16:35
7
7
  */
8
- import { SingleStream } from "../type";
8
+ import { SingleRemoteStream, SingleStream } from "../type";
9
9
  import { AudioPlayer } from '@hysc/core';
10
10
  import BMRoom from "../BMRoom/BMRoom";
11
11
  import { Subject } from "rxjs";
@@ -18,10 +18,10 @@ export default class AudioPlay {
18
18
  playStateChangeWatcher: Subject<AudioPlayer>;
19
19
  deviceId?: string;
20
20
  constructor(containerId: string, room: BMRoom);
21
- addStream(stream: SingleStream): void;
21
+ addStream(stream: SingleRemoteStream): void;
22
22
  removeStream(stream: SingleStream): void;
23
23
  removeStreamByUid(uid: string): void;
24
- play(stream: SingleStream): Promise<void>;
24
+ play(stream: SingleRemoteStream): Promise<void>;
25
25
  mute(mute: boolean): void;
26
26
  setVolume(streamId: string, volume: number): void;
27
27
  setDevice(deviceId: string): void;
@@ -29,6 +29,7 @@ export interface BloudStreamEventState {
29
29
  isScreen: boolean;
30
30
  video: boolean;
31
31
  audio: boolean;
32
+ customInfo?: StreamCustomInfo;
32
33
  }
33
34
  export interface BloudStreamState {
34
35
  video: boolean;
@@ -17,5 +17,6 @@ export declare function handleStreamPublished(event: any, bmStreamVm: BMStreamMo
17
17
  export declare function handleBloudStreamPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
18
18
  export declare function handleBloudStreamPubAUpdate(data: BloudStreamEventState, bmStreamVm: BMStreamModelVM, isPublish?: boolean): void;
19
19
  export declare function handleBloudStreamUnPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
20
+ export declare function handleBloudStreamUpdated(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
20
21
  export declare function handleBloudStreamUnpublish(data: BloudUnPubEvent, bmStreamVm: BMStreamModelVM): void;
21
22
  export declare function handleShareStreamFailed(bmRoom: BMRoom, bmStreamVm: BMStreamModelVM): void;
@@ -133,7 +133,7 @@ export declare const BMStreamDisconnectedError: (type: string) => BoomError;
133
133
  export declare const BmSyncStreamFailError: () => BoomError;
134
134
  export declare const BMStreamConnectError: () => BoomError;
135
135
  export declare const BMShareStreamConnectError: () => BoomError;
136
- export declare const BMStreamReconnectSuccess: (audio: boolean, video: boolean) => BoomError | undefined;
136
+ export declare const BMStreamReconnectSuccess: (audio: boolean, video: boolean) => BoomError;
137
137
  export declare const BMShareStreamReconnectSuccess: () => BoomError;
138
138
  export declare const BMStreamReconnectFailed: () => BoomError;
139
139
  export declare const BMShareStreamReconnectFailed: () => BoomError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hysc/meeting",
3
- "version": "5.0.91",
3
+ "version": "5.0.93",
4
4
  "description": "boom meeting",
5
5
  "main": "umd/index.js",
6
6
  "module": "esm/index.js",
@@ -14,18 +14,18 @@
14
14
  "author": "yangliye",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@hysc/bloud": "1.0.89",
18
- "@hysc/core": "5.0.89",
19
- "@hysc/logger": "1.0.0",
20
17
  "lodash-es": "^4.17.21",
21
18
  "mitt": "^3.0.0",
22
19
  "@hysc/p-queue": "6.3.0",
23
20
  "rxjs": "^7.5.5",
24
21
  "typescript": "^4.6.3",
25
- "@hysc/utils": "1.2.4"
22
+ "@hysc/bloud": "1.0.91",
23
+ "@hysc/core": "5.0.91",
24
+ "@hysc/utils": "1.2.4",
25
+ "@hysc/logger": "1.0.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@hysc/core": "5.0.89"
28
+ "@hysc/core": "5.0.91"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/lodash-es": "^4.17.6"
@@ -423,6 +423,6 @@ export declare enum BCEvent {
423
423
  BRTC_SHARE_SYNC_ROOM_COMPLETED = "brtc-share-sync-room-completed",
424
424
  LEAVE_USERS = "leaveUsers",
425
425
  ROOM_ERROR = "error-room",
426
- UPDDATE_STREAM = "update-stream"
426
+ UPDATE_STREAM = "update-stream"
427
427
  }
428
428
  export default BCEvent;
@@ -4,6 +4,7 @@ import { BehaviorSubject, Subject } from "rxjs";
4
4
  import { Player } from "@hysc/core/esm";
5
5
  import BMStreamModelVM from "./BMStreamModelVM";
6
6
  import { BloudStreamState } from "../handleEvent/attachEvents";
7
+ import type { StreamCustomInfo } from '@hysc/bloud';
7
8
  /**
8
9
  * @name: BMStreamModel
9
10
  * @author: yangliye
@@ -151,6 +152,7 @@ export default class BMStreamModel {
151
152
  * @param forceSearch
152
153
  */
153
154
  updateBloudStream(streamState: BloudStreamState | undefined, bmStreamVM: BMStreamModelVM, forceSearch?: boolean): void;
155
+ updateBloudCustomInfo(customInfo: StreamCustomInfo): void;
154
156
  private onPlayerStateChange;
155
157
  handleStreamConnectError: () => void;
156
158
  /**
@@ -19,12 +19,14 @@ import BMUser from "../BMUser/BMUser";
19
19
  import { SingleLocalStream, SingleRemoteStream, SingleStream } from "../type";
20
20
  import BMRoom from "../BMRoom/BMRoom";
21
21
  import { BehaviorSubject, Subject } from "rxjs";
22
- import BoomError from "../error/RTCError";
22
+ import { BoomError } from "@hysc/utils";
23
23
  import { Device } from "@hysc/core/esm/BoomAdapter/type/value";
24
24
  import BMSpeaker from "./BMSpeaker";
25
25
  import { ShareMediaOptions } from "@hysc/core/esm/BoomCore/BCClient/BCClient";
26
26
  import { getHTMLMediaStreamOptions, getMediaStreamInfo, Result } from "./getHTMLMediaStreamOptions";
27
27
  import { BloudStream } from "@hysc/core";
28
+ import type { StreamCustomInfo } from '@hysc/bloud';
29
+ import { BloudStreamEventState } from "../handleEvent/attachEvents";
28
30
  export declare function transShareScreen2User(userId: string): string;
29
31
  export default class BMStreamModelVM {
30
32
  streamModels: Map<string, BMStreamModel>;
@@ -81,6 +83,10 @@ export default class BMStreamModelVM {
81
83
  * 共享屏幕流错误
82
84
  */
83
85
  localShareError: Subject<BoomError>;
86
+ /**
87
+ * 共享屏幕流是单独处理的逻辑,不是先创建streamModel然后在去查流,而是先去查流,在创建streamModel
88
+ */
89
+ shareBloudStateMap: Map<string, BloudStreamEventState>;
84
90
  constructor();
85
91
  private static filterStreamModels;
86
92
  initWithRoom(room: BMRoom): this;
@@ -160,6 +166,10 @@ export default class BMStreamModelVM {
160
166
  * @param enable
161
167
  */
162
168
  muteSpeaker(enable: boolean): Promise<undefined>;
169
+ /**
170
+ * 创建本地音频流
171
+ */
172
+ createLocalAudioStream(): Promise<void>;
163
173
  /**
164
174
  * 创建流并且发布
165
175
  * @param audio 是否发布音频流
@@ -246,5 +256,9 @@ export default class BMStreamModelVM {
246
256
  */
247
257
  getHTMLMediaStream: typeof getHTMLMediaStreamOptions;
248
258
  getMediaStream: typeof getMediaStreamInfo;
259
+ /**
260
+ * 更新流信息 会给服务端发送updateStream信令,会收到updateStream的广播
261
+ */
262
+ updateBloudStreamCustomStats(uid: string, streamId: string, streamInfo: StreamCustomInfo): Promise<any> | undefined;
249
263
  clearCache(): void;
250
264
  }
@@ -5,7 +5,7 @@
5
5
  * @description:AudioPlay.ts
6
6
  * @update: 2023-06-08 16:35
7
7
  */
8
- import { SingleStream } from "../type";
8
+ import { SingleRemoteStream, SingleStream } from "../type";
9
9
  import { AudioPlayer } from '@hysc/core';
10
10
  import BMRoom from "../BMRoom/BMRoom";
11
11
  import { Subject } from "rxjs";
@@ -18,10 +18,10 @@ export default class AudioPlay {
18
18
  playStateChangeWatcher: Subject<AudioPlayer>;
19
19
  deviceId?: string;
20
20
  constructor(containerId: string, room: BMRoom);
21
- addStream(stream: SingleStream): void;
21
+ addStream(stream: SingleRemoteStream): void;
22
22
  removeStream(stream: SingleStream): void;
23
23
  removeStreamByUid(uid: string): void;
24
- play(stream: SingleStream): Promise<void>;
24
+ play(stream: SingleRemoteStream): Promise<void>;
25
25
  mute(mute: boolean): void;
26
26
  setVolume(streamId: string, volume: number): void;
27
27
  setDevice(deviceId: string): void;
@@ -29,6 +29,7 @@ export interface BloudStreamEventState {
29
29
  isScreen: boolean;
30
30
  video: boolean;
31
31
  audio: boolean;
32
+ customInfo?: StreamCustomInfo;
32
33
  }
33
34
  export interface BloudStreamState {
34
35
  video: boolean;
@@ -17,5 +17,6 @@ export declare function handleStreamPublished(event: any, bmStreamVm: BMStreamMo
17
17
  export declare function handleBloudStreamPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
18
18
  export declare function handleBloudStreamPubAUpdate(data: BloudStreamEventState, bmStreamVm: BMStreamModelVM, isPublish?: boolean): void;
19
19
  export declare function handleBloudStreamUnPublished(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
20
+ export declare function handleBloudStreamUpdated(data: any, bmStreamVm: BMStreamModelVM, observes: any): void;
20
21
  export declare function handleBloudStreamUnpublish(data: BloudUnPubEvent, bmStreamVm: BMStreamModelVM): void;
21
22
  export declare function handleShareStreamFailed(bmRoom: BMRoom, bmStreamVm: BMStreamModelVM): void;