瀏覽代碼

修复请求方式

wolyshaw 3 年之前
父節點
當前提交
4b9e12fba8
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/components/live-broadcast/runtime.ts

+ 4 - 4
src/components/live-broadcast/runtime.ts

@@ -392,8 +392,8 @@ export const startLive = async (resetTime = true) => {
     // await builder.setOutputVideoRenderMode?.(RTC.MixVideoRenderMode.WHOLE)
     // // @ts-ignore
     // await builder.flush()
-    await request.post('/api-web/imLiveBroadcastRoom/opsLiveVideo', {
-      data: {
+    await request.get('/api-web/imLiveBroadcastRoom/opsLiveVideo', {
+      params: {
         type: '1',
         roomUid: runtime.roomUid,
         userId: state.user?.speakerId,
@@ -412,8 +412,8 @@ export const startLive = async (resetTime = true) => {
  */
 export const closeLive = async () => {
   // removeMedia(runtime.mediaStreams, runtime.mediaStreamTrack)
-  await request.post('/api-web/imLiveBroadcastRoom/opsLiveVideo', {
-    data: {
+  await request.get('/api-web/imLiveBroadcastRoom/opsLiveVideo', {
+    params: {
       type: '2',
       roomUid: runtime.roomUid,
       userId: state.user?.speakerId,