larksr_websdk 3.2.343 → 3.2.401

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.
@@ -1821,6 +1821,9 @@ export namespace CloudLark {
1821
1821
 
1822
1822
  /** WebrtcOfferAnswer sdp */
1823
1823
  sdp?: (string|null);
1824
+
1825
+ /** WebrtcOfferAnswer index */
1826
+ index?: (number|null);
1824
1827
  }
1825
1828
 
1826
1829
  /** Represents a WebrtcOfferAnswer. */
@@ -1838,6 +1841,9 @@ export namespace CloudLark {
1838
1841
  /** WebrtcOfferAnswer sdp. */
1839
1842
  public sdp: string;
1840
1843
 
1844
+ /** WebrtcOfferAnswer index. */
1845
+ public index: number;
1846
+
1841
1847
  /**
1842
1848
  * Creates a new WebrtcOfferAnswer instance using the specified properties.
1843
1849
  * @param [properties] Properties to set
@@ -1923,6 +1929,9 @@ export namespace CloudLark {
1923
1929
 
1924
1930
  /** WebrtcIceCandidate username */
1925
1931
  username?: (string|null);
1932
+
1933
+ /** WebrtcIceCandidate index */
1934
+ index?: (number|null);
1926
1935
  }
1927
1936
 
1928
1937
  /** Represents a WebrtcIceCandidate. */
@@ -1946,6 +1955,9 @@ export namespace CloudLark {
1946
1955
  /** WebrtcIceCandidate username. */
1947
1956
  public username: string;
1948
1957
 
1958
+ /** WebrtcIceCandidate index. */
1959
+ public index: number;
1960
+
1949
1961
  /**
1950
1962
  * Creates a new WebrtcIceCandidate instance using the specified properties.
1951
1963
  * @param [properties] Properties to set
@@ -7679,6 +7691,333 @@ export namespace CloudLark {
7679
7691
  }
7680
7692
  }
7681
7693
 
7694
+ /** Properties of a VideoReconfigure. */
7695
+ interface IVideoReconfigure {
7696
+
7697
+ /** VideoReconfigure bitrate */
7698
+ bitrate?: (number|null);
7699
+ }
7700
+
7701
+ /** Represents a VideoReconfigure. */
7702
+ class VideoReconfigure implements IVideoReconfigure {
7703
+
7704
+ /**
7705
+ * Constructs a new VideoReconfigure.
7706
+ * @param [properties] Properties to set
7707
+ */
7708
+ constructor(properties?: CloudLark.IVideoReconfigure);
7709
+
7710
+ /** VideoReconfigure bitrate. */
7711
+ public bitrate?: (number|null);
7712
+
7713
+ /** VideoReconfigure video. */
7714
+ public video?: "bitrate";
7715
+
7716
+ /**
7717
+ * Creates a new VideoReconfigure instance using the specified properties.
7718
+ * @param [properties] Properties to set
7719
+ * @returns VideoReconfigure instance
7720
+ */
7721
+ public static create(properties?: CloudLark.IVideoReconfigure): CloudLark.VideoReconfigure;
7722
+
7723
+ /**
7724
+ * Encodes the specified VideoReconfigure message. Does not implicitly {@link CloudLark.VideoReconfigure.verify|verify} messages.
7725
+ * @param message VideoReconfigure message or plain object to encode
7726
+ * @param [writer] Writer to encode to
7727
+ * @returns Writer
7728
+ */
7729
+ public static encode(message: CloudLark.IVideoReconfigure, writer?: $protobuf.Writer): $protobuf.Writer;
7730
+
7731
+ /**
7732
+ * Encodes the specified VideoReconfigure message, length delimited. Does not implicitly {@link CloudLark.VideoReconfigure.verify|verify} messages.
7733
+ * @param message VideoReconfigure message or plain object to encode
7734
+ * @param [writer] Writer to encode to
7735
+ * @returns Writer
7736
+ */
7737
+ public static encodeDelimited(message: CloudLark.IVideoReconfigure, writer?: $protobuf.Writer): $protobuf.Writer;
7738
+
7739
+ /**
7740
+ * Decodes a VideoReconfigure message from the specified reader or buffer.
7741
+ * @param reader Reader or buffer to decode from
7742
+ * @param [length] Message length if known beforehand
7743
+ * @returns VideoReconfigure
7744
+ * @throws {Error} If the payload is not a reader or valid buffer
7745
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7746
+ */
7747
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CloudLark.VideoReconfigure;
7748
+
7749
+ /**
7750
+ * Decodes a VideoReconfigure message from the specified reader or buffer, length delimited.
7751
+ * @param reader Reader or buffer to decode from
7752
+ * @returns VideoReconfigure
7753
+ * @throws {Error} If the payload is not a reader or valid buffer
7754
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7755
+ */
7756
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CloudLark.VideoReconfigure;
7757
+
7758
+ /**
7759
+ * Verifies a VideoReconfigure message.
7760
+ * @param message Plain object to verify
7761
+ * @returns `null` if valid, otherwise the reason why it is not
7762
+ */
7763
+ public static verify(message: { [k: string]: any }): (string|null);
7764
+
7765
+ /**
7766
+ * Creates a VideoReconfigure message from a plain object. Also converts values to their respective internal types.
7767
+ * @param object Plain object
7768
+ * @returns VideoReconfigure
7769
+ */
7770
+ public static fromObject(object: { [k: string]: any }): CloudLark.VideoReconfigure;
7771
+
7772
+ /**
7773
+ * Creates a plain object from a VideoReconfigure message. Also converts values to other types if specified.
7774
+ * @param message VideoReconfigure
7775
+ * @param [options] Conversion options
7776
+ * @returns Plain object
7777
+ */
7778
+ public static toObject(message: CloudLark.VideoReconfigure, options?: $protobuf.IConversionOptions): { [k: string]: any };
7779
+
7780
+ /**
7781
+ * Converts this VideoReconfigure to JSON.
7782
+ * @returns JSON object
7783
+ */
7784
+ public toJSON(): { [k: string]: any };
7785
+ }
7786
+
7787
+ /** Properties of a ClientStatics. */
7788
+ interface IClientStatics {
7789
+
7790
+ /** ClientStatics bytesReceivedInSecond */
7791
+ bytesReceivedInSecond?: (number|null);
7792
+
7793
+ /** ClientStatics rtt */
7794
+ rtt?: (number|null);
7795
+
7796
+ /** ClientStatics packageLostInSecond */
7797
+ packageLostInSecond?: (number|null);
7798
+
7799
+ /** ClientStatics decodeDelay */
7800
+ decodeDelay?: (number|null);
7801
+
7802
+ /** ClientStatics totalProcessDelay */
7803
+ totalProcessDelay?: (number|null);
7804
+ }
7805
+
7806
+ /** Represents a ClientStatics. */
7807
+ class ClientStatics implements IClientStatics {
7808
+
7809
+ /**
7810
+ * Constructs a new ClientStatics.
7811
+ * @param [properties] Properties to set
7812
+ */
7813
+ constructor(properties?: CloudLark.IClientStatics);
7814
+
7815
+ /** ClientStatics bytesReceivedInSecond. */
7816
+ public bytesReceivedInSecond: number;
7817
+
7818
+ /** ClientStatics rtt. */
7819
+ public rtt: number;
7820
+
7821
+ /** ClientStatics packageLostInSecond. */
7822
+ public packageLostInSecond: number;
7823
+
7824
+ /** ClientStatics decodeDelay. */
7825
+ public decodeDelay: number;
7826
+
7827
+ /** ClientStatics totalProcessDelay. */
7828
+ public totalProcessDelay: number;
7829
+
7830
+ /**
7831
+ * Creates a new ClientStatics instance using the specified properties.
7832
+ * @param [properties] Properties to set
7833
+ * @returns ClientStatics instance
7834
+ */
7835
+ public static create(properties?: CloudLark.IClientStatics): CloudLark.ClientStatics;
7836
+
7837
+ /**
7838
+ * Encodes the specified ClientStatics message. Does not implicitly {@link CloudLark.ClientStatics.verify|verify} messages.
7839
+ * @param message ClientStatics message or plain object to encode
7840
+ * @param [writer] Writer to encode to
7841
+ * @returns Writer
7842
+ */
7843
+ public static encode(message: CloudLark.IClientStatics, writer?: $protobuf.Writer): $protobuf.Writer;
7844
+
7845
+ /**
7846
+ * Encodes the specified ClientStatics message, length delimited. Does not implicitly {@link CloudLark.ClientStatics.verify|verify} messages.
7847
+ * @param message ClientStatics message or plain object to encode
7848
+ * @param [writer] Writer to encode to
7849
+ * @returns Writer
7850
+ */
7851
+ public static encodeDelimited(message: CloudLark.IClientStatics, writer?: $protobuf.Writer): $protobuf.Writer;
7852
+
7853
+ /**
7854
+ * Decodes a ClientStatics message from the specified reader or buffer.
7855
+ * @param reader Reader or buffer to decode from
7856
+ * @param [length] Message length if known beforehand
7857
+ * @returns ClientStatics
7858
+ * @throws {Error} If the payload is not a reader or valid buffer
7859
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7860
+ */
7861
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CloudLark.ClientStatics;
7862
+
7863
+ /**
7864
+ * Decodes a ClientStatics message from the specified reader or buffer, length delimited.
7865
+ * @param reader Reader or buffer to decode from
7866
+ * @returns ClientStatics
7867
+ * @throws {Error} If the payload is not a reader or valid buffer
7868
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7869
+ */
7870
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CloudLark.ClientStatics;
7871
+
7872
+ /**
7873
+ * Verifies a ClientStatics message.
7874
+ * @param message Plain object to verify
7875
+ * @returns `null` if valid, otherwise the reason why it is not
7876
+ */
7877
+ public static verify(message: { [k: string]: any }): (string|null);
7878
+
7879
+ /**
7880
+ * Creates a ClientStatics message from a plain object. Also converts values to their respective internal types.
7881
+ * @param object Plain object
7882
+ * @returns ClientStatics
7883
+ */
7884
+ public static fromObject(object: { [k: string]: any }): CloudLark.ClientStatics;
7885
+
7886
+ /**
7887
+ * Creates a plain object from a ClientStatics message. Also converts values to other types if specified.
7888
+ * @param message ClientStatics
7889
+ * @param [options] Conversion options
7890
+ * @returns Plain object
7891
+ */
7892
+ public static toObject(message: CloudLark.ClientStatics, options?: $protobuf.IConversionOptions): { [k: string]: any };
7893
+
7894
+ /**
7895
+ * Converts this ClientStatics to JSON.
7896
+ * @returns JSON object
7897
+ */
7898
+ public toJSON(): { [k: string]: any };
7899
+ }
7900
+
7901
+ /** Properties of a ServerStatics. */
7902
+ interface IServerStatics {
7903
+
7904
+ /** ServerStatics captureDelay */
7905
+ captureDelay?: (number|null);
7906
+
7907
+ /** ServerStatics captureFramerate */
7908
+ captureFramerate?: (number|null);
7909
+
7910
+ /** ServerStatics renderDelay */
7911
+ renderDelay?: (number|null);
7912
+
7913
+ /** ServerStatics renderFramerate */
7914
+ renderFramerate?: (number|null);
7915
+
7916
+ /** ServerStatics encoderDelay */
7917
+ encoderDelay?: (number|null);
7918
+
7919
+ /** ServerStatics encoderFramerate */
7920
+ encoderFramerate?: (number|null);
7921
+ }
7922
+
7923
+ /** Represents a ServerStatics. */
7924
+ class ServerStatics implements IServerStatics {
7925
+
7926
+ /**
7927
+ * Constructs a new ServerStatics.
7928
+ * @param [properties] Properties to set
7929
+ */
7930
+ constructor(properties?: CloudLark.IServerStatics);
7931
+
7932
+ /** ServerStatics captureDelay. */
7933
+ public captureDelay: number;
7934
+
7935
+ /** ServerStatics captureFramerate. */
7936
+ public captureFramerate: number;
7937
+
7938
+ /** ServerStatics renderDelay. */
7939
+ public renderDelay: number;
7940
+
7941
+ /** ServerStatics renderFramerate. */
7942
+ public renderFramerate: number;
7943
+
7944
+ /** ServerStatics encoderDelay. */
7945
+ public encoderDelay: number;
7946
+
7947
+ /** ServerStatics encoderFramerate. */
7948
+ public encoderFramerate: number;
7949
+
7950
+ /**
7951
+ * Creates a new ServerStatics instance using the specified properties.
7952
+ * @param [properties] Properties to set
7953
+ * @returns ServerStatics instance
7954
+ */
7955
+ public static create(properties?: CloudLark.IServerStatics): CloudLark.ServerStatics;
7956
+
7957
+ /**
7958
+ * Encodes the specified ServerStatics message. Does not implicitly {@link CloudLark.ServerStatics.verify|verify} messages.
7959
+ * @param message ServerStatics message or plain object to encode
7960
+ * @param [writer] Writer to encode to
7961
+ * @returns Writer
7962
+ */
7963
+ public static encode(message: CloudLark.IServerStatics, writer?: $protobuf.Writer): $protobuf.Writer;
7964
+
7965
+ /**
7966
+ * Encodes the specified ServerStatics message, length delimited. Does not implicitly {@link CloudLark.ServerStatics.verify|verify} messages.
7967
+ * @param message ServerStatics message or plain object to encode
7968
+ * @param [writer] Writer to encode to
7969
+ * @returns Writer
7970
+ */
7971
+ public static encodeDelimited(message: CloudLark.IServerStatics, writer?: $protobuf.Writer): $protobuf.Writer;
7972
+
7973
+ /**
7974
+ * Decodes a ServerStatics message from the specified reader or buffer.
7975
+ * @param reader Reader or buffer to decode from
7976
+ * @param [length] Message length if known beforehand
7977
+ * @returns ServerStatics
7978
+ * @throws {Error} If the payload is not a reader or valid buffer
7979
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7980
+ */
7981
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CloudLark.ServerStatics;
7982
+
7983
+ /**
7984
+ * Decodes a ServerStatics message from the specified reader or buffer, length delimited.
7985
+ * @param reader Reader or buffer to decode from
7986
+ * @returns ServerStatics
7987
+ * @throws {Error} If the payload is not a reader or valid buffer
7988
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7989
+ */
7990
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CloudLark.ServerStatics;
7991
+
7992
+ /**
7993
+ * Verifies a ServerStatics message.
7994
+ * @param message Plain object to verify
7995
+ * @returns `null` if valid, otherwise the reason why it is not
7996
+ */
7997
+ public static verify(message: { [k: string]: any }): (string|null);
7998
+
7999
+ /**
8000
+ * Creates a ServerStatics message from a plain object. Also converts values to their respective internal types.
8001
+ * @param object Plain object
8002
+ * @returns ServerStatics
8003
+ */
8004
+ public static fromObject(object: { [k: string]: any }): CloudLark.ServerStatics;
8005
+
8006
+ /**
8007
+ * Creates a plain object from a ServerStatics message. Also converts values to other types if specified.
8008
+ * @param message ServerStatics
8009
+ * @param [options] Conversion options
8010
+ * @returns Plain object
8011
+ */
8012
+ public static toObject(message: CloudLark.ServerStatics, options?: $protobuf.IConversionOptions): { [k: string]: any };
8013
+
8014
+ /**
8015
+ * Converts this ServerStatics to JSON.
8016
+ * @returns JSON object
8017
+ */
8018
+ public toJSON(): { [k: string]: any };
8019
+ }
8020
+
7682
8021
  /** Properties of a ClientInput. */
7683
8022
  interface IClientInput {
7684
8023
 
@@ -7759,6 +8098,12 @@ export namespace CloudLark {
7759
8098
 
7760
8099
  /** ClientInput rtmpStop */
7761
8100
  rtmpStop?: (CloudLark.IRtmp_Stop|null);
8101
+
8102
+ /** ClientInput videoConfigure */
8103
+ videoConfigure?: (CloudLark.IVideoReconfigure|null);
8104
+
8105
+ /** ClientInput clientStatics */
8106
+ clientStatics?: (CloudLark.IClientStatics|null);
7762
8107
  }
7763
8108
 
7764
8109
  /** Represents a ClientInput. */
@@ -7848,8 +8193,14 @@ export namespace CloudLark {
7848
8193
  /** ClientInput rtmpStop. */
7849
8194
  public rtmpStop?: (CloudLark.IRtmp_Stop|null);
7850
8195
 
8196
+ /** ClientInput videoConfigure. */
8197
+ public videoConfigure?: (CloudLark.IVideoReconfigure|null);
8198
+
8199
+ /** ClientInput clientStatics. */
8200
+ public clientStatics?: (CloudLark.IClientStatics|null);
8201
+
7851
8202
  /** ClientInput input. */
7852
- public input?: ("mouseMove"|"mouseDown"|"mouseUp"|"mouseWheel"|"keyDown"|"keyUp"|"clientEnter"|"clientLeave"|"dispatchController"|"requesController"|"textInput"|"gamepadInputJoystickStates"|"gamepadInputButtonDown"|"gamepadInputButtonUp"|"gamepadInputTriger"|"clientDcMsg"|"touchMove"|"touchDown"|"touchUp"|"aiVoicestreamStart"|"aiVoicestreamSlice"|"aiVoicestreamStop"|"aiVoicestreamReset"|"aiVoiceText"|"rtmpStart"|"rtmpStop");
8203
+ public input?: ("mouseMove"|"mouseDown"|"mouseUp"|"mouseWheel"|"keyDown"|"keyUp"|"clientEnter"|"clientLeave"|"dispatchController"|"requesController"|"textInput"|"gamepadInputJoystickStates"|"gamepadInputButtonDown"|"gamepadInputButtonUp"|"gamepadInputTriger"|"clientDcMsg"|"touchMove"|"touchDown"|"touchUp"|"aiVoicestreamStart"|"aiVoicestreamSlice"|"aiVoicestreamStop"|"aiVoicestreamReset"|"aiVoiceText"|"rtmpStart"|"rtmpStop"|"videoConfigure"|"clientStatics");
7853
8204
 
7854
8205
  /**
7855
8206
  * Creates a new ClientInput instance using the specified properties.
@@ -8089,6 +8440,9 @@ export namespace CloudLark {
8089
8440
 
8090
8441
  /** AppNotification notifyFeatures */
8091
8442
  notifyFeatures?: (CloudLark.INotifyFeatures|null);
8443
+
8444
+ /** AppNotification serverStatics */
8445
+ serverStatics?: (CloudLark.IServerStatics|null);
8092
8446
  }
8093
8447
 
8094
8448
  /** Represents an AppNotification. */
@@ -8145,8 +8499,11 @@ export namespace CloudLark {
8145
8499
  /** AppNotification notifyFeatures. */
8146
8500
  public notifyFeatures?: (CloudLark.INotifyFeatures|null);
8147
8501
 
8502
+ /** AppNotification serverStatics. */
8503
+ public serverStatics?: (CloudLark.IServerStatics|null);
8504
+
8148
8505
  /** AppNotification notify. */
8149
- public notify?: ("resize"|"mousemode"|"updatePlayers"|"requestInput"|"gamepadOutput"|"datachannelState"|"appDcMsg"|"cursorStyle"|"aiVoiceRealtimeParseresult"|"aiVoiceResult"|"aiVoiceServiceStatus"|"aiVoiceErr"|"rtmpState"|"rtmpError"|"notifyFeatures");
8506
+ public notify?: ("resize"|"mousemode"|"updatePlayers"|"requestInput"|"gamepadOutput"|"datachannelState"|"appDcMsg"|"cursorStyle"|"aiVoiceRealtimeParseresult"|"aiVoiceResult"|"aiVoiceServiceStatus"|"aiVoiceErr"|"rtmpState"|"rtmpError"|"notifyFeatures"|"serverStatics");
8150
8507
 
8151
8508
  /**
8152
8509
  * Creates a new AppNotification instance using the specified properties.
@@ -3,7 +3,7 @@ export declare class Level {
3
3
  static WARN: string;
4
4
  static ERR: string;
5
5
  static TRACE: string;
6
- static getLevelIndex(level: string): 0 | 2 | 1 | 3 | 4;
6
+ static getLevelIndex(level: string): 0 | 1 | 2 | 3 | 4;
7
7
  }
8
8
  export interface LogObserver {
9
9
  onLog(msg: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.343",
3
+ "version": "3.2.401",
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",
package/types/api.d.ts CHANGED
@@ -78,6 +78,13 @@ export interface StartAppInfo {
78
78
  appKey?: string;
79
79
  groupId?: string;
80
80
  }
81
+ declare type HostAppliGetUrlReturnParams = {
82
+ appliId: string;
83
+ appKey: string;
84
+ timestamp: string;
85
+ signature: string;
86
+ groupId?: string;
87
+ };
81
88
  export default class API {
82
89
  static CheckUTLockInfoPath: string;
83
90
  static GetTaskPATH: string;
@@ -98,12 +105,7 @@ export default class API {
98
105
  }): Promise<{
99
106
  host: string;
100
107
  origin: string;
101
- params: {
102
- appliId: string;
103
- appKey: string;
104
- timestamp: string;
105
- signature: string;
106
- };
108
+ params: HostAppliGetUrlReturnParams;
107
109
  }>;
108
110
  static GetStartInfo(serverAddress: string, params: {
109
111
  sdkId: string;
@@ -131,3 +133,4 @@ export default class API {
131
133
  static RegionList(server: string, params: any): Promise<unknown>;
132
134
  static joinParam(params: any): string;
133
135
  }
136
+ export {};
@@ -30,6 +30,7 @@ export interface IAppliParams {
30
30
  * taskid
31
31
  */
32
32
  taskid: string;
33
+ taskId: string;
33
34
  /**
34
35
  * 当前应用名称
35
36
  */
@@ -176,7 +177,7 @@ export interface IAppliParams {
176
177
  /**
177
178
  * 优先使用的解码器
178
179
  */
179
- preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x';
180
+ preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1' | 'av1x';
180
181
  /**
181
182
  * 触摸操作对应的操作方式,触摸屏还是鼠标
182
183
  */
@@ -222,6 +223,7 @@ export declare class AppliParams implements IAppliParams {
222
223
  wsProxy: boolean;
223
224
  preferPubOutIp: string;
224
225
  taskid: string;
226
+ get taskId(): string;
225
227
  appliName: string;
226
228
  width: number;
227
229
  height: number;
@@ -253,7 +255,7 @@ export declare class AppliParams implements IAppliParams {
253
255
  mobileVirtualJoystick: boolean;
254
256
  mouseZoomDirection: number;
255
257
  showPlayerList: boolean;
256
- preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x';
258
+ preferDecoder: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1' | 'av1x';
257
259
  touchOperateMode: 'touchScreen' | 'mouse';
258
260
  appliId: string;
259
261
  syncLocalToCloudClipboard: boolean;
@@ -5,6 +5,7 @@ import WebsocketProxy from './websocket_proxy';
5
5
  import { LarkSR } from '../larksr';
6
6
  import PixelStreamingWebsocketChannel from './test_pixel_streaming';
7
7
  import { RECORDER_STATE } from './recoder';
8
+ import PeerConnectionMediaShare from './peer_connection_media_share';
8
9
  export declare enum APP_STATE {
9
10
  BEFORE_CREATE = 0,
10
11
  INITED = 1,
@@ -52,10 +53,12 @@ export interface AppEvent extends LocalEvent<APP_EVENT_TYPE> {
52
53
  state: APP_STATE;
53
54
  }
54
55
  export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
56
+ MAX_MEDIA_SHARE_PEERCONNECTION: number;
55
57
  private websocketChannel;
56
58
  private websocketProxy;
57
59
  private testPixelStreaming;
58
60
  private peerConnection;
61
+ getMediaSharePeerConnection(index: number): PeerConnectionMediaShare;
59
62
  private mediaSharePeerConnectionImp;
60
63
  get peerConnectionCreated(): boolean;
61
64
  get state(): APP_STATE;
@@ -68,6 +71,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
68
71
  get audioPaused(): boolean | undefined;
69
72
  get videoPaused(): boolean | undefined;
70
73
  get serverFeatures(): Msg.CloudLark.INotifyFeatures | null | undefined;
74
+ get serverStatics(): Msg.CloudLark.IServerStatics | null | undefined;
71
75
  private get sharePeerConnection();
72
76
  private retryTime;
73
77
  private larksr;
@@ -87,6 +91,7 @@ export default class Application extends EventBase<APP_EVENT_TYPE, AppEvent> {
87
91
  inputText(text: string): void;
88
92
  sendTextToDataChannel(text: string): void;
89
93
  sendBinaryToDataChannel(binary: Uint8Array): void;
94
+ sendVideoBitrateKbps(bitrateKbps: number): void;
90
95
  aiDmTextInput(text: string): number;
91
96
  startAiDmVoiceInput(): Promise<number>;
92
97
  stopAiDmVoiceInput(): number;
@@ -8,6 +8,7 @@ export interface RTCShareMediaTrackBinding {
8
8
  track: MediaStreamTrack;
9
9
  transceiver: RTCRtpTransceiver | undefined;
10
10
  paused: boolean;
11
+ peerid: number;
11
12
  }
12
13
  export interface MediaShareInterface {
13
14
  audioDeviceId: string | undefined | null;
@@ -10,8 +10,8 @@ export default class Message {
10
10
  static startMonitorStreamReqeuest(request: Msg.CloudLark.IVrMonitorRequest): Msg.CloudLark.ToServerMessage;
11
11
  static rtcOfferMsg(type: string, sdp: string): Msg.CloudLark.ToServerMessage;
12
12
  static iceMsg(sdpmid: string, sdpMlineindex: number, candidate: string, username: string | null | undefined): Msg.CloudLark.ToServerMessage;
13
- static mediaShareRtcOfferMsg(type: string, sdp: string): Msg.CloudLark.ToServerMessage;
14
- static mediaShareIceMsg(sdpmid: string, sdpMlineindex: number, candidate: string): Msg.CloudLark.ToServerMessage;
13
+ static mediaShareRtcOfferMsg(type: string, sdp: string, index: number): Msg.CloudLark.ToServerMessage;
14
+ static mediaShareIceMsg(sdpmid: string, sdpMlineindex: number, candidate: string, index: number): Msg.CloudLark.ToServerMessage;
15
15
  static restartApp(): Msg.CloudLark.ToServerMessage;
16
16
  static getTaskResponseMsg(ressponse: Msg.CloudLark.TaskResponse.Response): string;
17
17
  static getStartStreamResponseMsg(ressponse: Msg.CloudLark.StartStreamResponse.Response): string;
@@ -81,6 +81,9 @@ export interface AggregatedStats {
81
81
  frameWidthStart: number;
82
82
  currentRoundTripTime: number;
83
83
  packetsLostPerc: number;
84
+ avgDecodeDelay: number;
85
+ avgProcessDelay: number;
86
+ serverStatics: Input.CloudLark.IServerStatics | null;
84
87
  }
85
88
  export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCEvent> implements MediaShareInterface {
86
89
  private config;
@@ -109,6 +112,8 @@ export default class PeerConnection extends EventBase<WEBRTC_EVENT_TYPE, WebRTCE
109
112
  private canvasRender;
110
113
  get serverFeatures(): CloudLark.INotifyFeatures | null;
111
114
  private _serverFeatures;
115
+ get serverStatics(): CloudLark.IServerStatics | null;
116
+ private _serverStatics;
112
117
  constructor(larksr: LarkSR, config: WebRTCConfig);
113
118
  create(streams?: MediaStream | undefined | null, config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
114
119
  createOffer(): void;
@@ -2,20 +2,46 @@ import { EventBase, LocalEvent } from '../event/event_base';
2
2
  import { LarkSR } from '../larksr';
3
3
  import { MediaShareInterface, RTCMediaTrackBinding } from './media_share_interface';
4
4
  import { CloudLark } from '@/protobuf/cloudlark';
5
+ import CanvasRender from './canvas_render';
5
6
  export declare enum WEBRTC_MEDIA_SHARE_EVENT_TYPE {
6
- RTC_SDP = 0,
7
- RTC_ICECANDIDATE = 1,
8
- ICE_STATE_CHANGE = 2,
9
- ERROR = 3,
10
- INFO = 4
7
+ RTC_SDP = "rtc_sdp",
8
+ RTC_ICECANDIDATE = "rtc_icecandidate",
9
+ ICE_STATE_CHANGE = "rtc_state_change",
10
+ ERROR = "rtc_error",
11
+ INFO = "rtc_info"
11
12
  }
12
13
  export interface WebRTCMediaShareEvent extends LocalEvent<WEBRTC_MEDIA_SHARE_EVENT_TYPE> {
13
14
  data?: any;
15
+ id: number;
14
16
  }
15
17
  export interface WebRTCConfig {
16
18
  serverIP: string;
17
19
  preferPubOutIp: string;
18
20
  }
21
+ export interface AggregatedSendStats {
22
+ timestamp: number;
23
+ bytesSent: number;
24
+ framesEncoded: number;
25
+ packetsLost: number;
26
+ bytesSentStart: number;
27
+ framesEncodedStart: number;
28
+ timestampStart: number;
29
+ bitrate: number;
30
+ lowBitrate: number;
31
+ highBitrate: number;
32
+ avgBitrate: number;
33
+ framerate: number;
34
+ lowFramerate: number;
35
+ highFramerate: number;
36
+ avgframerate: number;
37
+ framesSent: number;
38
+ frameHeight: number;
39
+ frameWidth: number;
40
+ frameHeightStart: number;
41
+ frameWidthStart: number;
42
+ currentRoundTripTime: number;
43
+ packetsLostPerc: number;
44
+ }
19
45
  export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHARE_EVENT_TYPE, WebRTCMediaShareEvent> implements MediaShareInterface {
20
46
  get audioDeviceId(): string | undefined;
21
47
  get audioTrack(): MediaStreamTrack | undefined;
@@ -33,11 +59,40 @@ export default class PeerConnectionMediaShare extends EventBase<WEBRTC_MEDIA_SHA
33
59
  private videoBinding;
34
60
  private sdpCreateSuccess;
35
61
  private readonly sendStream;
36
- private canvasRender;
37
- constructor(larksr: LarkSR);
62
+ get canvasRender(): CanvasRender;
63
+ private _canvasRender;
64
+ private netTestTimeout;
65
+ get aggregatedStats(): AggregatedSendStats | null;
66
+ private set aggregatedStats(value);
67
+ private _aggregatedStats;
68
+ private lastThrowBadNetork;
69
+ private lastPacktetsLost;
70
+ private lastPacktetsReceived;
71
+ set preferVideoCode(code: 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x');
72
+ get preferVideoCode(): 'auto' | 'vp8' | 'vp9' | 'h264' | 'h265' | 'hevc' | 'av1x';
73
+ private _preferDecoder;
74
+ set codeRate(codeRate: {
75
+ start: number;
76
+ min: number;
77
+ max: number;
78
+ });
79
+ get codeRate(): {
80
+ start: number;
81
+ min: number;
82
+ max: number;
83
+ };
84
+ private _codeRate;
85
+ get id(): number;
86
+ private _id;
87
+ set forceRenderToCanvas(force: boolean);
88
+ get forceRenderToCanvas(): boolean;
89
+ private _forceRenderToCanvas;
90
+ constructor(larksr: LarkSR, id: number);
38
91
  create(config?: CloudLark.IRTCConfiguration | null | undefined): Promise<void>;
39
92
  createOffer(): void;
40
93
  close(): void;
94
+ getStats(): Promise<AggregatedSendStats>;
95
+ getStateChrome(): Promise<AggregatedSendStats>;
41
96
  setAudioEnable(enable: boolean): void;
42
97
  setVideoEnable(enable: boolean): void;
43
98
  setShareEnable(enable: boolean): void;