freealise commited on
Commit
e90ca5f
·
verified ·
1 Parent(s): 8945278

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -930,9 +930,9 @@ window.recorder = null;
930
 
931
  function record_video() {
932
  try {
933
- if (BABYLON.VideoRecorder.IsSupported(BABYLON.Engine) && (recorder == null || !recorder.isRecording) ) {
934
  if (recorder == null) {
935
- recorder = new BABYLON.VideoRecorder(BABYLON.Engine, { mimeType:'video/mp4', fps:25, /*audioTracks: mediaStreamDestination.stream.getAudioTracks()*/ });
936
  }
937
  recorder.startRecording('video.mp4', 60*60);
938
  }
 
930
 
931
  function record_video() {
932
  try {
933
+ if (BABYLON.VideoRecorder.IsSupported(BABYLON.Engine.LastCreatedScene.getEngine()) && (recorder == null || !recorder.isRecording) ) {
934
  if (recorder == null) {
935
+ recorder = new BABYLON.VideoRecorder(BABYLON.Engine.LastCreatedScene.getEngine(), { mimeType:'video/mp4', fps:25, /*audioTracks: mediaStreamDestination.stream.getAudioTracks()*/ });
936
  }
937
  recorder.startRecording('video.mp4', 60*60);
938
  }