larksr_websdk 3.2.325 → 3.2.326

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.
@@ -40,7 +40,18 @@ interface ILarkSRConfig {
40
40
  * 注意,当关闭时不会自动填充根元素,如果根元素高度为 0 将显示不出来。
41
41
  * 注意,当关闭时 mobileForceLandscape 将失去作用。
42
42
  */
43
+ handleRootElementSize?: boolean;
44
+ /**
45
+ * 同 handleRootElementSize
46
+ */
43
47
  handelRootElementSize?: boolean;
48
+ /**
49
+ * 是否只设置根的组件的旋转。只当 handleRootElementSize 为 true 时有效。设置根组件的旋转用于 mobileForceLandscape 模式。
50
+ * 默认为false,此时 SDK 会设置根组件的宽高,margin 0,padding 0
51
+ * 为true并且handleRootElementSize也为true时,只设置根组件的旋转属性,用于强制横屏模式以及强制横屏竖屏的切换。
52
+ * 要注意onlyHandleRootElementTransform开启成功时,要保证根节点的元素大小并且当根节点变化时应调用 resize 方法通知更新根节点的大小。
53
+ */
54
+ onlyHandleRootElementTransform?: boolean;
44
55
  /**
45
56
  * 是否在sdk内部监听鼠标键盘等输入事件
46
57
  * 如果关闭需要手动发送输入事件
@@ -52,7 +63,7 @@ interface ILarkSRConfig {
52
63
  * 当视频播自动放失败时是否尝试静音播放,静音播放时将抛出事件
53
64
  * 静音播放当用户操作屏幕时将尝试播放声音
54
65
  */
55
- mutePlayWhenFiled?: boolean;
66
+ mutePlayWhenFailed?: boolean;
56
67
  /**
57
68
  * 可选项,是否是 vr 监控类型。
58
69
  */
@@ -446,9 +446,11 @@ RTMP_STREAM_ERROR = "rtmpstreamerror"
446
446
  /**
447
447
  * 采集一帧图像
448
448
  * @params data: any 抛出采集事件时抛出的附加data,比如采集的时间戳
449
+ * @params option: { width: number, height: number } 截图的宽高,如果未设置则使用云端应用窗口的宽高
449
450
  * @return { data: any, base64: base64string } 返回传入的 data 和采集的 base64 字符串
450
451
  */
451
- captrueFrame(data: any)
452
+ captrueFrame(data: any, option?: { width: number; height: number;})
453
+
452
454
  /**
453
455
  * 设置是否强制横屏显示内容.
454
456
  * handelRootElementSize 必须设置为 true 才有作用。
@@ -248,4 +248,19 @@ larksr.op.gestureHandler.tapLimitTimeout = 100;
248
248
  5. 添加 `RTMP_STREAM_STATE = "rtmpstreamstate"` 事件,返回云端直播推流事件
249
249
  6. 添加 `RTMP_STREAM_ERROR = "rtmpstreamerror"` 事件,返回云端直播推流错误
250
250
  7. 添加 `larksr.StartCloudLiveStreaming(params)` 接口,启动云端直播推流功能
251
- 8. 添加 `larksr.StopLiveStreaming()` 接口,关闭云端直播推流功能.
251
+ 8. 添加 `larksr.StopLiveStreaming()` 接口,关闭云端直播推流功能.
252
+
253
+ ## V3.2.326
254
+
255
+ 1. 截图接口 `captrueFrame(data: any, option?: { width: number; height: number;})` 添加 option 参数,可以设置截图的宽高
256
+ 2. 添加 onlyHandleRootElementTransform 参数 `new LarkSR({ ... 此处省略其他配置 ... onlyHandleRootElementTransform: 0})`
257
+
258
+ ```javascript
259
+ /**
260
+ * 是否只设置根的组件的旋转。只当 handleRootElementSize 为 true 时有效。设置根组件的旋转用于 mobileForceLandscape 模式。
261
+ * 默认为false,此时 SDK 会设置根组件的宽高,margin 0,padding 0
262
+ * 为true并且handleRootElementSize也为true时,只设置根组件的旋转属性,用于强制横屏模式以及强制横屏竖屏的切换。
263
+ * 要注意onlyHandleRootElementTransform开启成功时,要保证根节点的元素大小并且当根节点变化时应调用 resize 方法通知更新根节点的大小。
264
+ */
265
+ onlyHandleRootElementTransform?: boolean;
266
+ ```