1

Im still a beginner in nodejs. I need to get the info of whether the stream is running or not so that i can display that error in frontend.

import { VideoStream } from '../src/video-stream';

const streamer: VideoStream = new VideoStream({
    debug: true,
    wsPort: 9999,
    ffmpegPath: 'ffmpeg',
    ffmpegArgs: {
        '-b:v': '2048K',
        '-an': '',
        '-r': '24',
    },
});

streamer.start();

setTimeout(() => {
    console.info([...streamer.liveMuxers.keys()]);
}, 9999);

This is the code that they had it in their test.js. I tried this and it working. but im still trying to get the info.

I tried changing something in the main package file but i can't figure it out. Any help appreciated.

0 Answers0