xushiting 3 năm trước cách đây
mục cha
commit
a54066b9f3
2 tập tin đã thay đổi với 20 bổ sung1 xóa
  1. 8 0
      index.html
  2. 12 1
      modules/index.js

+ 8 - 0
index.html

@@ -124,6 +124,14 @@
       <script src="./libs/socket.2.3.js"></script>
       <script src="./webrtc//adapter-7.4.0.min.js"></script>
       <script src="./webrtc/srs.sdk.js"></script>
+
+      <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"></script>
+      <script>
+          // init vConsole
+          var vConsole = new VConsole();
+          console.log('Hello world');
+      </script>
+
       <script type="module">
         import App from "./modules/index.js";
 

+ 12 - 1
modules/index.js

@@ -218,8 +218,18 @@ export default class App {
                 });
 
             } else {
-                // 获得旋转视频
+                
+                // write the bytes of the string to an ArrayBuffer
+                //var ab = new ArrayBuffer(data.length);
+                var ia = new Uint8Array(data);
+                for (var i = 0; i < data.length; i++) {
+                    ia[i] = data.charCodeAt(i);
+                }
+
                 const blob = new Blob([data], { type: 'application/video' })
+
+                // 获得旋转视频
+                //const blob = new Blob([data], { type: 'application/video' })
                 const url = URL.createObjectURL(blob)
                 // this.updateHouseVideoBlob(url, true)
                 // let video = common.createVideoElement0(url)
@@ -229,6 +239,7 @@ export default class App {
                 }, 3000)
 
                 // this.cameraController.rotateCamera(this.cameraController.alphaOffset)
+                
 
                 let video
                 if(this.isReverse) {