浏览代码

更新版本到 1.6.13

ChangeLog
1. 适配 macOS 下 safari 14.0.1 BUG 导致啪嗒声的问题
2. 其他内部优化
kevin.song 5 年之前
父节点
当前提交
32171d1f12
共有 4 个文件被更改,包括 12 次插入11 次删除
  1. 6 6
      README.md
  2. 2 1
      lib/index.d.ts
  3. 3 3
      lib/index.js
  4. 1 1
      package.json

+ 6 - 6
README.md

@@ -926,7 +926,7 @@ client.setVideoProfile(Profile, onSuccess, onFailure)
 - Profile 为 string 或 CustomVideoProfile 或 VideoProfileOptions 类型,必传,类型说明如下
   - 为 string 类型时,使用预定义的视频 Profile(可用 getSupportProfileNames 获取预定义的 Profile),如 `client.setVideoProfile('640*480', onSuccess, onFailure)`;
   - 为 CustomVideoProfile 时,使用用户自定义的视频 Profile,如 `client.setVideoProfile({width:640, height:480, framerate:20, bitrate:500}, onSuccess, onFailure)`,具体参见下面说明;
-  - 为 VideoProfileOptions 时,对指定的本地(预览)流设置视频 Profile,如 `client.setVideoProfile({previewId: 'xxx', profile: '640*480'}, onSuccess, onFailure)`,具体参见下面说明;
+  - 为 VideoProfileOptions 时,对指定的本地(预览)流设置视频 Profile,如 `client.setVideoProfile({streamId: 'xxx', profile: '640*480'}, onSuccess, onFailure)`,具体参见下面说明;
 
 CustomVideoProfile 自定义视频 Profile:
 
@@ -943,16 +943,16 @@ VideoProfileOptions 指定流的视频 Profile:
 
 ```js
 {
-  previewId: string                     // 必填,本地(预览)流的 previewId
+  streamId: string                      // 必填,本地流的流 ID (sid)
   profile: string | CustomVideoProfile  // 必填,指定 video profile,可用预定义或自定义的 Profile
 }
 ```
 
 > 注:
-> 1. 参数为预定义 Profile 或 CustomVideoProfile 时,为全局生效,后续创建/发布的流的视频都将设置为此 Profile。
-> 2. 参数为 VideoProfileOptions 类型时,只对 previewId 对应的流生效,可使用预定义的 Profile 或 自定义的 Profile。
-> 3. 已发布的流,不可变更 video profile,故请在 publish 前调用此方法
-> 4. 屏幕共享流创建后,亦无法变更 video profile,故通过 createStream 方法创建屏幕共享流时,请在创建前调用 setVideoProfile
+> 1. 参数为预定义 Profile 或 CustomVideoProfile 时,为全局生效,后续创建的流的视频都将设置为此 Profile。
+> 2. 屏幕共享流创建后,无法变更 video profile,故请在创建前通过更改全局的 Profile。
+> 3. 参数为 VideoProfileOptions 类型时,只对指定流ID的流生效
+> 4. 原 VideoProfileOptions 中指定流 ID 所使用的 previewId 已废弃,请使用 streamId 代替
 
 - onSuccess: function 类型,选传,方法调用成功时执行的回调函数,函数说明如下
 

+ 2 - 1
lib/index.d.ts

@@ -295,7 +295,7 @@ declare module '__urtc-sdk/resolutions' {
 }
 
 declare module '__urtc-sdk/version' {
-  export const version = "1.6.12";
+  export const version = "1.6.13";
 }
 
 declare module '__urtc-sdk/token' {
@@ -602,6 +602,7 @@ declare module '__urtc-sdk/types' {
     bitrate: number;
   }
   export interface VideoProfileOptions {
+    streamId?: string;
     previewId?: string;
     profile: string | CustomVideoProfile;
   }

文件差异内容过多而无法显示
+ 3 - 3
lib/index.js


+ 1 - 1
package.json

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