Skip to content

improve videojs-wavesurfer microphone plugin imports #405

@thijstriemstra

Description

@thijstriemstra

This requires videojs-wavesurfer v3.0 or newer.

So videojs-record 4.0 would stop using the src: 'live' option and use a config like this instead (note the WaveSurfer.microphone.create call):

let player = videojs('myAudio', {
    controls: true,
    width: 600,
    height: 300,
    plugins: {
        wavesurfer: {
            debug: true,
            backend: 'WebAudio',
            waveColor: 'black',
            cursorWidth: 0,
            interact: false,
            hideScrollbar: true,
            plugins: [
                // enable microphone plugin
                WaveSurfer.microphone.create({
                    bufferSize: 4096,
                    numberOfInputChannels: 1,
                    numberOfOutputChannels: 1
                })
            ]
        },
        record: {
            audio: true,
            video: false,
            maxLength: 20,
            debug: true
        }
    }
});

This should move the import of the wavesurfer.js microphone plugin out of the videojs-record plugin and make it easier for the user to debug/fix that import in their own code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions