()
| 459 | |
| 460 | //record and download videos on mobile devices |
| 461 | function startMobileRecording(){ |
| 462 | |
| 463 | var stream = animation.captureStream(fps); |
| 464 | var recorder = new MediaRecorder(stream, { 'type': 'video/mp4' }); |
| 465 | recorder.addEventListener('dataavailable', finishMobileRecording); |
| 466 | |
| 467 | console.log("start simple video recording"); |
| 468 | console.log("Video dimensions: "+animation.width+", "+animation.height); |
| 469 | |
| 470 | //display user message |
| 471 | recordingMessageCountdown(videoDuration); |
| 472 | recordingMessageDiv.classList.remove("hidden"); |
| 473 | |
| 474 | recorder.start(); |
| 475 | |
| 476 | setTimeout(function() { |
| 477 | recorder.stop(); |
| 478 | }, 1000*videoDuration+200); |
| 479 | } |
| 480 | |
| 481 | function finishMobileRecording(e) { |
| 482 | setTimeout(function(){ |
no test coverage detected