larksr_websdk 3.2.324 → 3.2.327

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.
@@ -104,12 +104,14 @@ export default class ScreenState extends EventBase<SCREEN_EVENT_TYPE, ScreenEven
104
104
  private _rootElement;
105
105
  private mobileForceLandScape;
106
106
  private bgColor;
107
- get handelRootElementSize(): boolean;
108
- private _handelRootElementSize;
107
+ get handleRootElementSize(): boolean;
108
+ private _handleRootElementSize;
109
+ get onlyHandleRootElementTransform(): boolean;
110
+ private _onlyHandleRootElementTransform;
109
111
  private larksr;
110
112
  get baseElementScale(): number;
111
113
  private _baseElementScale;
112
- constructor(rootElement: HTMLElement, params: IAppliParams, larksr: LarkSR, handelRootElementSize?: boolean);
114
+ constructor(rootElement: HTMLElement, params: IAppliParams, larksr: LarkSR, handleRootElementSize?: boolean, onlyHandleRootElementTransform?: boolean);
113
115
  reset(params: IAppliParams): void;
114
116
  setMobileForceLandScape(force: boolean): void;
115
117
  resize(baseElementScale?: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larksr_websdk",
3
- "version": "3.2.324",
3
+ "version": "3.2.327",
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/larksr.d.ts CHANGED
@@ -218,7 +218,7 @@ interface ILarkSRConfig {
218
218
  * 必选项 根元素。组件会挂载到跟元素下面
219
219
  * 注意*不要*设置为 document.documentElement
220
220
  * 默认模式下会通过旋转根元素实现强制横屏模式。
221
- * @see handelRootElementSize
221
+ * @see handleRootElementSize
222
222
  * @see scaleMode
223
223
  */
224
224
  rootElement: HTMLElement;
@@ -249,7 +249,18 @@ interface ILarkSRConfig {
249
249
  * 注意,当关闭时不会自动填充根元素,如果根元素高度为 0 将显示不出来。
250
250
  * 注意,当关闭时 mobileForceLandscape 将失去作用。
251
251
  */
252
+ handleRootElementSize?: boolean;
253
+ /**
254
+ * 同 handleRootElementSize
255
+ */
252
256
  handelRootElementSize?: boolean;
257
+ /**
258
+ * 是否只设置根的组件的旋转。只当 handleRootElementSize 为 true 时有效。设置根组件的旋转用于 mobileForceLandscape 模式。
259
+ * 默认为false,此时 SDK 会设置根组件的宽高,margin 0,padding 0
260
+ * 为true并且handleRootElementSize也为true时,只设置根组件的旋转属性,用于强制横屏模式以及强制横屏竖屏的切换。
261
+ * 要注意onlyHandleRootElementTransform开启成功时,要保证根节点的元素大小并且当根节点变化时应调用 resize 方法通知更新根节点的大小。
262
+ */
263
+ onlyHandleRootElementTransform?: boolean;
253
264
  /**
254
265
  * 是否在sdk内部监听鼠标键盘等输入事件
255
266
  * 如果关闭需要手动发送输入事件
@@ -261,7 +272,7 @@ interface ILarkSRConfig {
261
272
  * 当视频播自动放失败时是否尝试静音播放,静音播放时将抛出事件
262
273
  * 静音播放当用户操作屏幕时将尝试播放声音
263
274
  */
264
- mutePlayWhenFiled?: boolean;
275
+ mutePlayWhenFailed?: boolean;
265
276
  /**
266
277
  * 可选项,是否是 vr 监控类型。
267
278
  */
@@ -362,6 +373,11 @@ interface ILarkSRConfig {
362
373
  * 'touchScreen' | 'mouse'
363
374
  */
364
375
  touchOperateMode?: 'touchScreen' | 'mouse';
376
+ /**
377
+ * 优先使用渲染服务器点对点连接外网ip
378
+ * 如果配置将覆盖后台设置的 preferPublicIp 参数
379
+ */
380
+ preferPublicIp?: string;
365
381
  }
366
382
  declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
367
383
  /**
@@ -525,6 +541,12 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
525
541
  * @param config 本地配置,优先级最高
526
542
  */
527
543
  constructor(config: ILarkSRConfig);
544
+ /**
545
+ * 单独设置服务器地址,作用同 config 中的 serverAddress 字段
546
+ * 在进入应用之前都可以更新。
547
+ * @param serverAddress 服务器地址,如 http://192.168.0.55:8181/
548
+ */
549
+ updateServerAddress(serverAddress: string): void;
528
550
  /**
529
551
  * 单独设置sdk授权码,目前总会返回成功 promise,具体验证失败将在 connectWithPxyHost 或 connect 返回
530
552
  * @param id sdk id 初始化sdkid
@@ -592,7 +614,7 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
592
614
  destroy(): void;
593
615
  /**
594
616
  * 设置是否强制横屏显示内容.
595
- * handelRootElementSize 必须设置为 true 才有作用。
617
+ * handleRootElementSize 必须设置为 true 才有作用。
596
618
  * 要注意强制横屏模式下网页的坐标系xy和视觉上相反,如果通过外部输入 input 事件。要注意调整
597
619
  * @param force 是否强制横屏
598
620
  */
@@ -656,9 +678,13 @@ declare class LarkSR extends EventBase<LarkSRClientEvent, LarkSREvent> {
656
678
  /**
657
679
  * 采集一帧图像
658
680
  * @params data: any 抛出采集事件时抛出的附加data,比如采集的时间戳
681
+ * @params option: { width: number, height: number } 截图的宽高,如果未设置则使用云端应用窗口的宽高
659
682
  * @return { data: any, base64: base64string } 返回传入的 data 和采集的 base64 字符串
660
683
  */
661
- captrueFrame(data: any): {
684
+ captrueFrame(data: any, option?: {
685
+ width: number;
686
+ height: number;
687
+ } | null | undefined): {
662
688
  data: any;
663
689
  base64: any;
664
690
  };