larksr_websdk 3.2.8 → 3.2.9

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.
@@ -69,7 +69,11 @@ declare enum LarkSRClientEvent {
69
69
  /**
70
70
  * 获取到远端视频流 .
71
71
  */
72
- GOT_REMOTE_STREAM = "gotremotesteam",
72
+ GOT_REMOTE_STREAM = "gotremotestream",
73
+ /**
74
+ * 获取到远端音频流 .
75
+ */
76
+ GOT_REMOTE_AUDIO_STREAM = "gotremoteaudiostream",
73
77
  /**
74
78
  * 视频加载成功,等待播放 .
75
79
  */
@@ -368,6 +372,14 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
368
372
  * 视频显示组件
369
373
  */
370
374
  get videoComponent(): any;
375
+ /**
376
+ * 音频元素
377
+ */
378
+ get audioElement(): HTMLAudioElement;
379
+ /**
380
+ * 是否有单独的音频流
381
+ */
382
+ get isSeprateAudioTrack(): any;
371
383
  /**
372
384
  * 视频显示组件的父容器
373
385
  */
@@ -515,10 +527,12 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
515
527
  $emitError(message?: string, code?: number): void;
516
528
  $emitInfo(message?: string, code?: number): void;
517
529
  private createEvent;
530
+ private setupListener;
518
531
  private taskProcess;
519
532
  private startProcess;
520
533
  private onAppStateChange;
521
534
  private onGotRemoteStream;
535
+ private onGotRemoteAudioStream;
522
536
  private onCursorStyle;
523
537
  private onAppResize;
524
538
  private onAppMouseMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.8",
3
+ "version": "3.2.9",
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",
@@ -26,17 +26,18 @@ export declare enum APP_EVENT_TYPE {
26
26
  INFO = 3,
27
27
  APP_CLOSE = 4,
28
28
  REMOTE_STREAM = 5,
29
- SYNC_CURSORSTYLE = 6,
30
- APP_STATE_CHANGE = 7,
31
- NET_STATE = 8,
32
- LK_APP_RESIZE = 9,
33
- LK_APP_MOUSE_MODE = 10,
34
- LK_APP_PLAER_LIST = 11,
35
- LK_APP_REQUEST_TEXT = 12,
36
- LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 13,
37
- LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 14,
38
- LK_DATA_CHANNEL_RENDERSERVER_OPEN = 15,
39
- LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 16
29
+ REMOTE_AUDIO_STREAM = 6,
30
+ SYNC_CURSORSTYLE = 7,
31
+ APP_STATE_CHANGE = 8,
32
+ NET_STATE = 9,
33
+ LK_APP_RESIZE = 10,
34
+ LK_APP_MOUSE_MODE = 11,
35
+ LK_APP_PLAER_LIST = 12,
36
+ LK_APP_REQUEST_TEXT = 13,
37
+ LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 14,
38
+ LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 15,
39
+ LK_DATA_CHANNEL_RENDERSERVER_OPEN = 16,
40
+ LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 17
40
41
  }
41
42
  export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
42
43
  data?: any;
@@ -93,6 +94,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
93
94
  private onLocalSdp;
94
95
  private onLoacalIce;
95
96
  private onRemoteStream;
97
+ private onAudioRemoteStream;
96
98
  private onRtcError;
97
99
  private onIceStateChange;
98
100
  retryPeerconnection(): void;
@@ -9,22 +9,23 @@ export declare enum IceState {
9
9
  }
10
10
  export declare enum WEBRTC_EVENT_TYPE {
11
11
  GOT_REMOTE_STREAM = 0,
12
- ICE_STATE_CHANGE = 1,
13
- LK_APP_RESIZE = 2,
14
- LK_APP_MOUSE_MODE = 3,
15
- LK_APP_PLAER_LIST = 4,
16
- LK_APP_REQUEST_TEXT = 5,
17
- LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 6,
18
- LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 7,
19
- LK_DATA_CHANNEL_RENDERSERVER_OPEN = 8,
20
- LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 9,
21
- LK_RTC_EVENT_PEERCONNECTION_STATE = 10,
22
- NET_STATE = 11,
23
- SYNC_CURSORSTYLE = 12,
24
- BAD_NETWORK = 13,
25
- ERROR = 14,
26
- RTC_SDP = 15,
27
- RTC_ICECANDIDATE = 16
12
+ GOT_REMOTE_AUDIO_STREAM = 1,
13
+ ICE_STATE_CHANGE = 2,
14
+ LK_APP_RESIZE = 3,
15
+ LK_APP_MOUSE_MODE = 4,
16
+ LK_APP_PLAER_LIST = 5,
17
+ LK_APP_REQUEST_TEXT = 6,
18
+ LK_DATA_CHANNEL_RENDERSERVER_TEXT_MESSAGE = 7,
19
+ LK_DATA_CHANNEL_RENDERSERVER_BINARY_MESSAGE = 8,
20
+ LK_DATA_CHANNEL_RENDERSERVER_OPEN = 9,
21
+ LK_DATA_CHANNEL_RENDERSERVER_CLOSE = 10,
22
+ LK_RTC_EVENT_PEERCONNECTION_STATE = 11,
23
+ NET_STATE = 12,
24
+ SYNC_CURSORSTYLE = 13,
25
+ BAD_NETWORK = 14,
26
+ ERROR = 15,
27
+ RTC_SDP = 16,
28
+ RTC_ICECANDIDATE = 17
28
29
  }
29
30
  export interface GoogleBitRate {
30
31
  start: number;
@@ -84,6 +85,8 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
84
85
  private lastPacktetsLost;
85
86
  private lastPacktetsReceived;
86
87
  private larksr;
88
+ private audioStream;
89
+ private videoStream;
87
90
  constructor(larksr: LarkSR, config: WebRTCConfig);
88
91
  create(): void;
89
92
  createOffer(): void;
@@ -105,7 +108,7 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
105
108
  private onCreateOfferSuccess;
106
109
  private onIceCandidate;
107
110
  private onIceStateChange;
108
- private gotRemoteStream;
111
+ private ontrack;
109
112
  private addIceCandidate;
110
113
  private iceStateChange;
111
114
  private $emit;
package/types/larksr.d.ts CHANGED
@@ -69,7 +69,11 @@ declare enum LarkSRClientEvent {
69
69
  /**
70
70
  * 获取到远端视频流 .
71
71
  */
72
- GOT_REMOTE_STREAM = "gotremotesteam",
72
+ GOT_REMOTE_STREAM = "gotremotestream",
73
+ /**
74
+ * 获取到远端音频流 .
75
+ */
76
+ GOT_REMOTE_AUDIO_STREAM = "gotremoteaudiostream",
73
77
  /**
74
78
  * 视频加载成功,等待播放 .
75
79
  */
@@ -368,6 +372,14 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
368
372
  * 视频显示组件
369
373
  */
370
374
  get videoComponent(): any;
375
+ /**
376
+ * 音频元素
377
+ */
378
+ get audioElement(): HTMLAudioElement;
379
+ /**
380
+ * 是否有单独的音频流
381
+ */
382
+ get isSeprateAudioTrack(): any;
371
383
  /**
372
384
  * 视频显示组件的父容器
373
385
  */
@@ -515,10 +527,12 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
515
527
  $emitError(message?: string, code?: number): void;
516
528
  $emitInfo(message?: string, code?: number): void;
517
529
  private createEvent;
530
+ private setupListener;
518
531
  private taskProcess;
519
532
  private startProcess;
520
533
  private onAppStateChange;
521
534
  private onGotRemoteStream;
535
+ private onGotRemoteAudioStream;
522
536
  private onCursorStyle;
523
537
  private onAppResize;
524
538
  private onAppMouseMode;
@@ -1,14 +1,17 @@
1
1
  import { CloudLark } from '../protobuf/cloudlark';
2
2
  import { LocalEvent, EventBase } from '../event/event_base';
3
+ import { Point } from '../common/interface';
3
4
  import { LarkSR } from '../larksr';
4
5
  export declare const enum OPREATION_EVENT_TYPE {
5
6
  Input = 0,
6
7
  NoOperationTimeout = 1,
7
- ClipboardText = 2
8
+ ClipboardText = 2,
9
+ CursorMove = 3
8
10
  }
9
11
  export interface OperationEvent extends LocalEvent<OPREATION_EVENT_TYPE> {
10
12
  input?: CloudLark.ClientInput;
11
13
  data?: any;
14
+ cursorPoint?: Point;
12
15
  }
13
16
  export default class Operation extends EventBase<OPREATION_EVENT_TYPE, OperationEvent> {
14
17
  private gestureHandler;
@@ -61,4 +64,5 @@ export default class Operation extends EventBase<OPREATION_EVENT_TYPE, Operation
61
64
  $emitTouchUp(id: number, x: number, y: number): void;
62
65
  $emitInputEvent(input: CloudLark.IClientInput): void;
63
66
  $emitNoOperationTimeoutEvent(): void;
67
+ $emitCursorMove(p: Point): void;
64
68
  }