浏览代码

Fixy Fixy

sebastien 7 年之前
父节点
当前提交
ea842c4895
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 4 4
      inspector/src/tabs/ToolsTab.ts
  2. 1 1
      src/Tools/babylon.videoRecorder.ts

+ 4 - 4
inspector/src/tabs/ToolsTab.ts

@@ -151,17 +151,17 @@ export class ToolsTab extends Tab {
                         this._videoRecorder = new VideoRecorder(this._scene.getEngine());
                     }
 
-                    if (this._videoRecorder.isRecording) {
-                        this._videoRecorder.stopRecording();
+                    if (this._videoRecorder!.isRecording) {
+                        this._videoRecorder!.stopRecording();
                     }
                     else {
                         videoRecorderElement.value = "Stop Recording Video";
-                        this._videoRecorder.startRecording().then(() => {
+                        this._videoRecorder!.startRecording().then(() => {
                             videoRecorderElement.value = "Start Recording Video";
                         });
                     }
                 };
-                elemValue.appendChild(inputElement);
+                elemValue.appendChild(videoRecorderElement);
             }
         }
     }

+ 1 - 1
src/Tools/babylon.videoRecorder.ts

@@ -108,7 +108,7 @@ module BABYLON {
          * @param engine Defines the BabylonJS Engine you wish to record
          * @param options Defines options that can be used to customized the capture
          */
-        constructor(engine: Engine, options: Nullable<VideoRecorderOptions>) {
+        constructor(engine: Engine, options: Nullable<VideoRecorderOptions> = null) {
             if (!VideoRecorder.IsSupported(engine)) {
                 throw "Your browser does not support recording so far.";
             }