Encoding uses MediaRecorder in real time. MP4 output needs a browser that records MP4 (recent Chrome, Edge and Safari).