Browse Source

更新版本到 1.5.17

ChangeLog
1. 修复录制/转推日志上报问题
2. 新增 "1280*720_1", "1280*720_2", "1920\*1080_1", "1920\*1080_2" 四种 profile
kevin.song 5 years ago
parent
commit
a0c6b074c7
4 changed files with 27 additions and 12 deletions
  1. 19 9
      README.md
  2. 2 2
      lib/index.js
  3. 1 1
      package.json
  4. 5 0
      types/index.d.ts

+ 19 - 9
README.md

@@ -350,12 +350,18 @@ client.on(EventType, Listener)
     - '5': 网络质量糟糕
     - '5': 网络质量糟糕
     - '6': 网络连接断开
     - '6': 网络连接断开
   - 当事件类型为 'stream-reconnected' 时,可用 `function Listener(Streams) {}` 类型的函数,函数的参数为 `{previous: Stream, current: Stream}`,其中 previous 是重连前的发布/订阅流,current 是重连后的发布/订阅流,请使用 current 来更新业务代码中的缓存。
   - 当事件类型为 'stream-reconnected' 时,可用 `function Listener(Streams) {}` 类型的函数,函数的参数为 `{previous: Stream, current: Stream}`,其中 previous 是重连前的发布/订阅流,current 是重连后的发布/订阅流,请使用 current 来更新业务代码中的缓存。
-  - 当事件类型为 'record-notify' 时,可用 `function Listener(Error, RecordResult) {}` 类型的函数,函数的参数为 Error 和 [RecordResult](#recordresult),其中 Error 为空(undefined)时,代表已成功录制,非空时,代表由于错误导致录制中止,其 name 属性为服务端返回的错误码,message 属性为错误信息。Error 的 name 有以下可能的值:
-    - '24149': 任务被停止,可能的原因有房间内没有任何流在推,或到存储服务器的连接已断开
-    - '24150': 任务开启后10秒,如果收到这个消息,则表示任务开启失败
-  - 当事件类型为 'relay-notify' 时,可用 `function Listener(Error, RelayResult) {}` 类型的函数,函数的参数为 Error 和 [RelayResult](#relayresult),其中 Error 为空(undefined)时,代表已成功转推,非空时,代表由于错误导致转推中止,其 name 属性为服务端返回的错误码,message 属性为错误信息。Error 的 name 有以下可能的值:
-    - '24149': 任务被停止,可能的原因有房间内没有任何流在推,或到推流地址(PushURL)的连接已断开
-    - '24150': 任务开启后10秒,如果收到这个消息,则表示任务开启失败
+  - 当事件类型为 'record-notify' 时,可用 `function Listener(MixNotification) {}` 类型的函数,函数的参数为 MixNotification 的 `{ code: string, message: string }`,code 有以下可能的值:
+    - '0':     (正常)录制任务开启后10秒左右,如果收到这个消息,表示录制任务开启成功
+    - '24151': (正常) 如果收到这个消息,表示加流成功
+    - '24149': (异常)任务被停止,可能的原因有房间内所有用户的推流已停止
+    - '24150': (异常)任务开启后10秒,如果收到这个消息,则表示任务开启失败
+    - '24152': (异常)表示加流失败
+  - 当事件类型为 'relay-notify' 时,可用 `function Listener(MixNotification) {}` 类型的函数,函数的参数为 MixNotification 的 `{ code: string, message: string }`,code 有以下可能的值:
+    - '0':     (正常)转推任务开启后10秒左右,如果收到这个消息,表示转推任务开启成功
+    - '24151': (正常) 如果收到这个消息,表示加流成功
+    - '24149': (异常)任务被停止,可能的原因有房间内所有用户的推流已停止,或到推流地址(PushURL)的连接已断开
+    - '24150': (异常)任务开启后10秒,如果收到这个消息,则表示任务开启失败
+    - '24152': (异常)表示加流失败
 
 
 
 
 #### 事件名解释:
 #### 事件名解释:
@@ -2263,7 +2269,7 @@ const profileNames = UCloudRTC.getSupportProfileNames();
 
 
 #### 返回值说明
 #### 返回值说明
 
 
-- profileNames: String 类型的数组,如当前可用的 ["240\*180", "320\*180", "320\*240", "480\*360", "640\*360", "640\*480", "1280\*720", "1920\*1080"]
+- profileNames: String 类型的数组,如当前可用的 ["240\*180", "320\*180", "320\*240", "480\*360", "640\*360", "640\*480", "1280\*720", "1280\*720_1", "1280\*720_2", "1920\*1080", "1920\*1080_1", "1920\*1080_2"]
 
 
 名称 | 视频宽高 | 帧率 | 视频最小带宽 | 视频最大带宽
 名称 | 视频宽高 | 帧率 | 视频最小带宽 | 视频最大带宽
 :-: | :-: | :-: | :-: | :-:
 :-: | :-: | :-: | :-: | :-:
@@ -2273,8 +2279,12 @@ const profileNames = UCloudRTC.getSupportProfileNames();
 "480\*360" | 480\*360 | 20 | 100 | 400
 "480\*360" | 480\*360 | 20 | 100 | 400
 "640\*360" | 640\*360 | 20 | 100 | 500
 "640\*360" | 640\*360 | 20 | 100 | 500
 "640\*480" | 640\*480 | 20 | 100 | 600
 "640\*480" | 640\*480 | 20 | 100 | 600
-"1280\*720" | 1280\*720 | 20 | 100 | 1000
-"1920\*1080" | 1920\*1080 | 20 | 100 | 1500
+"1280\*720" | 1280\*720 | 15 | 120 | 1000
+"1280\*720_1" | 1280\*720 | 15 | 120 | 1500
+"1280\*720_2" | 1280\*720 | 30 | 120 | 2000
+"1920\*1080" | 1920\*1080 | 15 | 120 | 1500
+"1920\*1080_1" | 1920\*1080 | 15 | 120 | 2000
+"1920\*1080_2" | 1920\*1080 | 30 | 120 | 2500
 
 
 ---
 ---
 
 

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


+ 1 - 1
package.json

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

+ 5 - 0
types/index.d.ts

@@ -367,3 +367,8 @@ export interface VideoProfileOptions {
   previewId?: string;
   previewId?: string;
   profile: string;
   profile: string;
 }
 }
+
+export interface MixNotification {
+  code: string;
+  message: string;
+}