Browse Source

更新版本到 1.5.20

ChangeLog
1. 修复有时无 user-added 事件的问题
2. 修复部分浏览器不支持采集屏幕共享时音频时报错的问题
3. 新增 enableAudioVolumeIndicator 方法及 volume-indicator 事件,用于定时报告远端流的音量
4. 添加 640*480_1, 1280*720_3, 1920*1080_3 三种5帧的 profile
5. 提高推图片流时的帧
6. 优化 trackst 与 streamst 时序错乱的问题
kevin.song 5 years ago
parent
commit
0ac16c903b
4 changed files with 44 additions and 11 deletions
  1. 29 5
      README.md
  2. 4 4
      lib/index.js
  3. 1 1
      package.json
  4. 10 1
      types/index.d.ts

File diff suppressed because it is too large
+ 29 - 5
README.md


File diff suppressed because it is too large
+ 4 - 4
lib/index.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "urtc-sdk",
-  "version": "1.5.19",
+  "version": "1.5.20",
   "description": "UCloud RTC javascript SDK",
   "main": "lib/index.js",
   "types": "types",

+ 10 - 1
types/index.d.ts

@@ -23,7 +23,8 @@ export declare type EventType =
   | 'network-quality'
   | 'stream-reconnected'
   | 'record-notify'
-  | 'relay-notify';
+  | 'relay-notify'
+  | 'volume-indicator';
 
 export declare type ConnectionState = 'OPEN' | 'CONNECTING' | 'CLOSING' | 'RECONNECTING' | 'CLOSED';
 
@@ -49,6 +50,7 @@ declare type FacingMode = 'user' | 'environment' | 'left' | 'right';
 export interface PublishOptions {
   audio: boolean; // 是否开启麦克风
   video: boolean; // 是否开启摄像头
+  screenAudio?: boolean; // 是否获取屏幕共享的音频
   screen: boolean; // 是否共享屏幕
   facingMode?: FacingMode; // 指定使用的摄像头
   microphoneId?: string; // 麦克风设备ID
@@ -372,3 +374,10 @@ export interface MixNotification {
   code: string;
   message: string;
 }
+
+export interface AudioVolume {
+  sid: string; // 流ID
+  uid: string; // 对应的用户的ID
+  mediaType: 'camera' | 'screen'; // 流的媒体类型,用于对发布流的区分
+  volume: number;
+}