浏览代码

融合通信单兵优化及视频播放

MSI\liwei 3 年之前
父节点
当前提交
3332562535
共有 3 个文件被更改,包括 45 次插入4 次删除
  1. 1 1
      index.html
  2. 24 0
      main.js
  3. 20 3
      meeting.js

+ 1 - 1
index.html

@@ -61,7 +61,7 @@
       <div class="video-content">
         <div id="vPlayArea"></div>
         <div class="video-bar">
-          <div class="video-action">结束会议</div>
+          <div class="video-action">结束视频</div>
         </div>
       </div>
       <div class="video-user-content">

+ 24 - 0
main.js

@@ -73,6 +73,30 @@ window.onload = () => {
               })
             }
           )
+        }else if(e.data.key === "video"){
+             const meeting = new Meeting();
+             console.log(e.data.channelId);
+             $(".video-container").css({
+              visibility: "visible"
+            })
+             await meeting.openClient(
+              () => {
+                $(".video-action").one("click", () => {
+                  meeting.closeClient();
+                  meeting.closeVideo();
+                  meeting.deleteMeeting();
+                  $(".video-container").css({
+                    visibility: "hidden"
+                  })
+                  window.parent.postMessage("closeIframe", "*");
+                })
+                meeting.playVideo({
+                  type: "single",
+                  deviceId: e.data.deviceId,
+                  channelId: e.data.channelId,
+                })
+              }
+            )
         }
 
         // 视频会议

+ 20 - 3
meeting.js

@@ -142,14 +142,15 @@ Meeting.prototype = {
   initWnd() {
     //左边窗口类型参数 分割 2行2列
     const typeObj = {
-      rows: 2,
-      cols: 2,
+      rows: 1,
+      cols: 1,
       wndSpaceing: 10,
       embedVideoMode: true,
       playerCtrlBarEnable: false,
-      displayMode: 0,
+      displayMode: 1,
       playMode: 0,
       playParams: {},
+      webControlExpend :true
     };
     //左边窗口实例
     window.vPlayArea = this.vPlayArea = new VideoPlay(
@@ -186,6 +187,22 @@ Meeting.prototype = {
       this.pullFlow(item.channelId);
     }
   },
+//   setDesignDivision(rows, cols) {
+//     // console.log(this.localUserInfo);
+//     const params = JSON.stringify({
+//         loginIp: setting.URL,
+//         method: "SetDesignDivision",
+//         userCode: this.localUserInfo.masterId,
+//         params: {
+//             handleName:'#vPlayArea',
+//             rows: Number(rows),
+//             cols: Number(cols)
+//         },
+//         socketCode: window.theSocket.socketCode
+//     });
+//     console.log(params);
+//     this.webSocketSend(params);
+// },
   //设备视频拉流
   pullFlow(chinnelId) {
     if (chinnelId) {