Kagami / vmsg

:musical_note: Library for creating voice messages
https://kagami.github.io/vmsg/
Creative Commons Zero v1.0 Universal
348 stars 58 forks source link

Move GUI to separate module #15

Open Kagami opened 6 years ago

Kagami commented 6 years ago

A lot of users suggest this, so better move it out and document GUI-less API properly.

thijstriemstra commented 5 years ago

+1, any news on this @Kagami?

ps. want to use this in videojs-record: https://github.com/collab-project/videojs-record/pull/287

Kagami commented 5 years ago

Currently no.

dradovic commented 5 years ago

IMHO, it should be mentioned in the README that vmsg can also be used without displaying any UI (although it's shipped with it). I only randomly discovered this when studying the vmsg.js.

Example:

<script type="module">
    import {
        Recorder
    } from "/lib/vmsg/vmsg.js";
    window.startRecording = async function () {
        if (!window.recorder) {
            window.recorder = new Recorder({
                wasmURL: "/lib/vmsg/vmsg.wasm"
            });
            await window.recorder.init();
        }
        window.recorder.startRecording();
    }
    window.stopRecording = async function () {
        await window.recorder.stopRecording();
        return window.recorder.blobURL;
    }
</script>
Kagami commented 5 years ago

There is example with custom UI in readme.