How to use the recordrtc.MediaStreamRecorder function in recordrtc

To help you get started, we’ve selected a few recordrtc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github collab-project / videojs-record / src / js / engine / record-rtc.js View on Github external
break;

            case ANIMATION:
                internal = this.engine.gifRecorder;
                break;

            default:
                internal = this.engine.videoRecorder;
        }

        let maxFileSizeReached = false;
        if (internal) {
            internal = internal.getInternalRecorder();
        }

        if ((internal instanceof RecordRTC.MediaStreamRecorder) === true) {
            this.player().recordedData = internal.getArrayOfBlobs();

            // inject file info for newest blob
            this.addFileInfo(
                this.player().recordedData[this.player_.recordedData.length - 1]);

            // check max file size
            if (this.maxFileSize > 0) {
                let currentSize = new Blob(this.player().recordedData).size;
                if (currentSize >= this.maxFileSize) {
                    maxFileSizeReached = true;
                }
            }
        }

        // notify others
github ralscha / blog / uploadflowjs / client / src / app / home / home.page.ts View on Github external
.then(async (stream) => {
        this.videoElement.nativeElement.srcObject = stream;
        await this.videoElement.nativeElement.play();

        const options = {
          mimeType: 'video/webm\;codecs=vp9',
          recorderType: RecordRTC.MediaStreamRecorder
        };
        this.recordRTC = RecordRTC(stream, options);
        this.recordRTC.startRecording();

      })
      .catch(function (err) {

recordrtc

RecordRTC is a server-less (entire client-side) JavaScript library that can be used to record WebRTC audio/video media streams. It supports cross-browser audio/video recording.

MIT
Latest version published 4 years ago

Package Health Score

64 / 100
Full package analysis