How to use the recordrtc.MRecordRTC 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
setup(stream, mediaType, debug) {
        this.inputStream = stream;
        this.mediaType = mediaType;
        this.debug = debug;

        if ('screen' in this.mediaType) {
            this.mediaType.video = true;
        }

        // recorder type
        if (this.recorderType !== undefined) {
            this.mediaType.video = this.recorderType;
        }

        // setup RecordRTC
        this.engine = new RecordRTC.MRecordRTC();
        this.engine.mediaType = this.mediaType;
        this.engine.disableLogs = !this.debug;
        this.engine.mimeType = this.mimeType;

        // audio settings
        this.engine.bufferSize = this.bufferSize;
        this.engine.sampleRate = this.sampleRate;
        this.engine.numberOfAudioChannels = this.audioChannels;

        // video/canvas settings
        this.engine.video = this.video;
        this.engine.canvas = this.canvas;
        this.engine.bitrate = this.bitRate;

        // animated gif settings
        this.engine.quality = this.quality;

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