shuisheng 1 anno fa
parent
commit
b7fc4d5598
2 ha cambiato i file con 6 aggiunte e 9 eliminazioni
  1. 5 8
      src/api/tencentcloudCss.ts
  2. 1 1
      src/hooks/webrtc/tencentcloudCss.ts

+ 5 - 8
src/api/tencentcloudCss.ts

@@ -2,13 +2,10 @@ import request from '@/utils/request';
 
 export function fetchTencentcloudCssPush(liveRoomId: number) {
   return request.post<{
-    obs: {
-      url: string;
-      key: string;
-    };
-    rtmp: string;
-    flv: string;
-    hls: string;
-    webrtc: string;
+    push_rtmp_url: string;
+    push_obs_server: string;
+    push_obs_stream_key: string;
+    push_webrtc_url: string;
+    push_srt_url: string;
   }>(`/tencentcloud_css/push`, { liveRoomId });
 }

+ 1 - 1
src/hooks/webrtc/tencentcloudCss.ts

@@ -76,7 +76,7 @@ export const useWebRtcTencentcloudCss = () => {
             // https://cloud.tencent.com/document/product/267/92713#1a9164cf-9f99-47d5-9667-ea558886cb9f
             // 使用用户自定义的音视频流。
             await livePusher.startCustomCapture(canvasVideoStream.value);
-            livePusher.startPush(res.data.webrtc);
+            livePusher.startPush(res.data.push_webrtc_url);
           }
         } else {
           console.error('rtc不存在');