larksr_websdk 3.2.332 → 3.2.333

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.
@@ -80,6 +80,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
80
80
  initPc(): void;
81
81
  releasePc(): void;
82
82
  releaseSharePc(): void;
83
+ closeSharePc(): void;
83
84
  clear(): void;
84
85
  changeOperater(uid: number): void;
85
86
  inputText(text: string): void;
@@ -128,12 +129,16 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
128
129
  private onRtmpStreamingError;
129
130
  private onIceStateChange;
130
131
  retryPeerconnection(): void;
132
+ private onShareMediaError;
133
+ private onShareMediaInfo;
134
+ private onShareMediaOffer;
135
+ private onShareMediaIce;
131
136
  setAudioEnable(enable: boolean): void | undefined;
132
137
  setVideoEnable(enable: boolean): void | undefined;
133
138
  setShareEnable(enable: boolean): void | undefined;
134
- closeAudio(): RTCMediaTrackBinding[] | undefined;
135
- closeVideo(): RTCMediaTrackBinding[] | undefined;
136
- closeShare(): RTCMediaTrackBinding[] | undefined;
139
+ closeAudio(): void | undefined;
140
+ closeVideo(): void | undefined;
141
+ closeShare(): void | undefined;
137
142
  openAudio(deviceId?: string): Promise<{
138
143
  streams: MediaStream;
139
144
  rtcRtpSenders: RTCMediaTrackBinding[];
@@ -16,11 +16,11 @@ export interface WebRTCConfig {
16
16
  preferPubOutIp: string;
17
17
  }
18
18
  export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHARE_EVENT_TYPE, WebRTCMediaShareEvent> {
19
- get audioDeviceId(): string;
19
+ get audioDeviceId(): string | undefined;
20
20
  get audioTrack(): MediaStreamTrack | {
21
21
  enabled: boolean;
22
22
  };
23
- get videoDeviceId(): string;
23
+ get videoDeviceId(): string | undefined;
24
24
  get videoTrack(): MediaStreamTrack | {
25
25
  enabled: boolean;
26
26
  };
@@ -28,8 +28,8 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
28
28
  private offerOptions;
29
29
  private pcConfig;
30
30
  private pc;
31
- private sdpCreateSuccess;
32
- private rtcRtpSenders;
31
+ private audioBinding;
32
+ private videoBinding;
33
33
  constructor(larksr: LarkSR);
34
34
  create(): Promise<void>;
35
35
  createOffer(): void;
@@ -37,9 +37,9 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
37
37
  setAudioEnable(enable: boolean): void;
38
38
  setVideoEnable(enable: boolean): void;
39
39
  setShareEnable(enable: boolean): void;
40
- closeAudio(): RTCMediaTrackBinding[];
41
- closeVideo(): RTCMediaTrackBinding[];
42
- closeShare(): RTCMediaTrackBinding[];
40
+ closeAudio(): void;
41
+ closeVideo(): void;
42
+ closeShare(): void;
43
43
  private stopLocalTrackBing;
44
44
  openAudio(deviceId?: string): Promise<{
45
45
  streams: MediaStream;
@@ -1008,9 +1008,10 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1008
1008
  * 关闭当前的音频设备
1009
1009
  * @returns
1010
1010
  */
1011
- closeAudio(): import("./lark/peer_connection").RTCMediaTrackBinding[] | undefined;
1012
- closeVideo(): import("./lark/peer_connection").RTCMediaTrackBinding[] | undefined;
1013
- closeShare(): import("./lark/peer_connection").RTCMediaTrackBinding[] | undefined;
1011
+ closeAudio(): void | undefined;
1012
+ closeVideo(): void | undefined;
1013
+ closeShare(): void | undefined;
1014
+ closeMediaChannel(): void;
1014
1015
  /**
1015
1016
  * 打开一个音频设备,要注意浏览器限制在 https 或者 localhost 下才能打开音频
1016
1017
  * @param deviceId 音频设备id,如果不传将打开默认设备。@see getConnectedAudioinputDevices
@@ -1018,7 +1019,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1018
1019
  */
1019
1020
  openAudio(deviceId?: string): Promise<{
1020
1021
  streams: MediaStream;
1021
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1022
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1023
+ * 应用参数,构建时传入
1024
+ */
1022
1025
  } | undefined>;
1023
1026
  /**
1024
1027
  * 打开一个视频设备,要注意浏览器限制在 https 或者 localhost 下才能打开视频
@@ -1028,7 +1031,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1028
1031
  */
1029
1032
  openVideo(audio?: boolean, cameraId?: string, width?: number, height?: number): Promise<{
1030
1033
  streams: MediaStream;
1031
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1034
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1035
+ * 应用参数,构建时传入
1036
+ */
1032
1037
  } | undefined>;
1033
1038
  /**
1034
1039
  * 打开默认媒体设备,要注意浏览器限制在 https 或者 localhost 下
@@ -1039,7 +1044,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1039
1044
  */
1040
1045
  openDefaultMedia(video?: boolean, audio?: boolean): Promise<{
1041
1046
  streams: MediaStream;
1042
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1047
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1048
+ * 应用参数,构建时传入
1049
+ */
1043
1050
  } | undefined>;
1044
1051
  openShareMediaDevice(): Promise<void | undefined>;
1045
1052
  /**
@@ -1056,15 +1063,21 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1056
1063
  getConnectedDevices(type: MediaDeviceKind): Promise<MediaDeviceInfo[] | undefined>;
1057
1064
  openAudioDevice(deviceId: string, kind?: "audioinput" | "audiooutput"): Promise<{
1058
1065
  streams: MediaStream;
1059
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1066
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1067
+ * 应用参数,构建时传入
1068
+ */
1060
1069
  } | undefined>;
1061
1070
  openCamera(cameraId: string, minWidth?: number, minHeight?: number): Promise<{
1062
1071
  streams: MediaStream;
1063
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1072
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1073
+ * 应用参数,构建时传入
1074
+ */
1064
1075
  } | undefined>;
1065
1076
  openUserMeida(constraints?: MediaStreamConstraints, reset?: boolean): Promise<{
1066
1077
  streams: MediaStream;
1067
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1078
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1079
+ * 应用参数,构建时传入
1080
+ */
1068
1081
  } | undefined>;
1069
1082
  addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean | undefined;
1070
1083
  removeMediaTrack(track: RTCRtpSender): boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.332",
3
+ "version": "3.2.333",
4
4
  "description": "Larksr websdk. Easy to build a cloud render client for larksr system or ue4 pixelstreaming.docs: https://pingxingyun.github.io/webclient_sdk/",
5
5
  "keywords": [
6
6
  "pingxingyun",
@@ -80,6 +80,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
80
80
  initPc(): void;
81
81
  releasePc(): void;
82
82
  releaseSharePc(): void;
83
+ closeSharePc(): void;
83
84
  clear(): void;
84
85
  changeOperater(uid: number): void;
85
86
  inputText(text: string): void;
@@ -128,12 +129,16 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
128
129
  private onRtmpStreamingError;
129
130
  private onIceStateChange;
130
131
  retryPeerconnection(): void;
132
+ private onShareMediaError;
133
+ private onShareMediaInfo;
134
+ private onShareMediaOffer;
135
+ private onShareMediaIce;
131
136
  setAudioEnable(enable: boolean): void | undefined;
132
137
  setVideoEnable(enable: boolean): void | undefined;
133
138
  setShareEnable(enable: boolean): void | undefined;
134
- closeAudio(): RTCMediaTrackBinding[] | undefined;
135
- closeVideo(): RTCMediaTrackBinding[] | undefined;
136
- closeShare(): RTCMediaTrackBinding[] | undefined;
139
+ closeAudio(): void | undefined;
140
+ closeVideo(): void | undefined;
141
+ closeShare(): void | undefined;
137
142
  openAudio(deviceId?: string): Promise<{
138
143
  streams: MediaStream;
139
144
  rtcRtpSenders: RTCMediaTrackBinding[];
@@ -16,11 +16,11 @@ export interface WebRTCConfig {
16
16
  preferPubOutIp: string;
17
17
  }
18
18
  export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHARE_EVENT_TYPE, WebRTCMediaShareEvent> {
19
- get audioDeviceId(): string;
19
+ get audioDeviceId(): string | undefined;
20
20
  get audioTrack(): MediaStreamTrack | {
21
21
  enabled: boolean;
22
22
  };
23
- get videoDeviceId(): string;
23
+ get videoDeviceId(): string | undefined;
24
24
  get videoTrack(): MediaStreamTrack | {
25
25
  enabled: boolean;
26
26
  };
@@ -28,8 +28,8 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
28
28
  private offerOptions;
29
29
  private pcConfig;
30
30
  private pc;
31
- private sdpCreateSuccess;
32
- private rtcRtpSenders;
31
+ private audioBinding;
32
+ private videoBinding;
33
33
  constructor(larksr: LarkSR);
34
34
  create(): Promise<void>;
35
35
  createOffer(): void;
@@ -37,9 +37,9 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
37
37
  setAudioEnable(enable: boolean): void;
38
38
  setVideoEnable(enable: boolean): void;
39
39
  setShareEnable(enable: boolean): void;
40
- closeAudio(): RTCMediaTrackBinding[];
41
- closeVideo(): RTCMediaTrackBinding[];
42
- closeShare(): RTCMediaTrackBinding[];
40
+ closeAudio(): void;
41
+ closeVideo(): void;
42
+ closeShare(): void;
43
43
  private stopLocalTrackBing;
44
44
  openAudio(deviceId?: string): Promise<{
45
45
  streams: MediaStream;
package/types/larksr.d.ts CHANGED
@@ -1008,9 +1008,10 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1008
1008
  * 关闭当前的音频设备
1009
1009
  * @returns
1010
1010
  */
1011
- closeAudio(): import("./lark/peer_connection").RTCMediaTrackBinding[] | undefined;
1012
- closeVideo(): import("./lark/peer_connection").RTCMediaTrackBinding[] | undefined;
1013
- closeShare(): import("./lark/peer_connection").RTCMediaTrackBinding[] | undefined;
1011
+ closeAudio(): void | undefined;
1012
+ closeVideo(): void | undefined;
1013
+ closeShare(): void | undefined;
1014
+ closeMediaChannel(): void;
1014
1015
  /**
1015
1016
  * 打开一个音频设备,要注意浏览器限制在 https 或者 localhost 下才能打开音频
1016
1017
  * @param deviceId 音频设备id,如果不传将打开默认设备。@see getConnectedAudioinputDevices
@@ -1018,7 +1019,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1018
1019
  */
1019
1020
  openAudio(deviceId?: string): Promise<{
1020
1021
  streams: MediaStream;
1021
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1022
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1023
+ * 应用参数,构建时传入
1024
+ */
1022
1025
  } | undefined>;
1023
1026
  /**
1024
1027
  * 打开一个视频设备,要注意浏览器限制在 https 或者 localhost 下才能打开视频
@@ -1028,7 +1031,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1028
1031
  */
1029
1032
  openVideo(audio?: boolean, cameraId?: string, width?: number, height?: number): Promise<{
1030
1033
  streams: MediaStream;
1031
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1034
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1035
+ * 应用参数,构建时传入
1036
+ */
1032
1037
  } | undefined>;
1033
1038
  /**
1034
1039
  * 打开默认媒体设备,要注意浏览器限制在 https 或者 localhost 下
@@ -1039,7 +1044,9 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1039
1044
  */
1040
1045
  openDefaultMedia(video?: boolean, audio?: boolean): Promise<{
1041
1046
  streams: MediaStream;
1042
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1047
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1048
+ * 应用参数,构建时传入
1049
+ */
1043
1050
  } | undefined>;
1044
1051
  openShareMediaDevice(): Promise<void | undefined>;
1045
1052
  /**
@@ -1056,15 +1063,21 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
1056
1063
  getConnectedDevices(type: MediaDeviceKind): Promise<MediaDeviceInfo[] | undefined>;
1057
1064
  openAudioDevice(deviceId: string, kind?: "audioinput" | "audiooutput"): Promise<{
1058
1065
  streams: MediaStream;
1059
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1066
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1067
+ * 应用参数,构建时传入
1068
+ */
1060
1069
  } | undefined>;
1061
1070
  openCamera(cameraId: string, minWidth?: number, minHeight?: number): Promise<{
1062
1071
  streams: MediaStream;
1063
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1072
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1073
+ * 应用参数,构建时传入
1074
+ */
1064
1075
  } | undefined>;
1065
1076
  openUserMeida(constraints?: MediaStreamConstraints, reset?: boolean): Promise<{
1066
1077
  streams: MediaStream;
1067
- rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[];
1078
+ rtcRtpSenders: import("./lark/peer_connection").RTCMediaTrackBinding[]; /**
1079
+ * 应用参数,构建时传入
1080
+ */
1068
1081
  } | undefined>;
1069
1082
  addMediaTrack(track: MediaStreamTrack, ...streams: MediaStream[]): boolean | undefined;
1070
1083
  removeMediaTrack(track: RTCRtpSender): boolean | undefined;