How to use the medooze-media-server.createStreamer function in medooze-media-server

To help you get started, we’ve selected a few medooze-media-server 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 notedit / rtmp-to-webrtc / mediaserver.js View on Github external
async createStream(streamName,rtmpUrl)
    {

        const videoStreamer = medoozeMediaServer.createStreamer();
        const audioStreamer = medoozeMediaServer.createStreamer();

        const video = new MediaInfo(streamName+':video','video');
        const audio = new MediaInfo(streamName+':audio','audio');

        //Add h264 codec
        video.addCodec(new CodecInfo(videoCodec,videoPt));
        audio.addCodec(new CodecInfo(audioCodec,audioPt));


        if (!videoPort) {
            videoPort = await this.getMediaPort();
            audioPort = await this.getMediaPort();
        }
github notedit / rtmp-to-webrtc / mediaserver.js View on Github external
async createStream(streamName,rtmpUrl)
    {

        const videoStreamer = medoozeMediaServer.createStreamer();
        const audioStreamer = medoozeMediaServer.createStreamer();

        const video = new MediaInfo(streamName+':video','video');
        const audio = new MediaInfo(streamName+':audio','audio');

        //Add h264 codec
        video.addCodec(new CodecInfo(videoCodec,videoPt));
        audio.addCodec(new CodecInfo(audioCodec,audioPt));


        if (!videoPort) {
            videoPort = await this.getMediaPort();
            audioPort = await this.getMediaPort();
        }


        const videoSession = videoStreamer.createSession(video, {
github medooze / media-server-demo-node / lib / broadcast.js View on Github external
//Get Semantic SDP objects
const SemanticSDP	= require("semantic-sdp");
const SDPInfo		= SemanticSDP.SDPInfo;
const MediaInfo		= SemanticSDP.MediaInfo;
const CandidateInfo	= SemanticSDP.CandidateInfo;
const DTLSInfo		= SemanticSDP.DTLSInfo;
const ICEInfo		= SemanticSDP.ICEInfo;
const StreamInfo	= SemanticSDP.StreamInfo;
const TrackInfo		= SemanticSDP.TrackInfo;
const Direction		= SemanticSDP.Direction;
const CodecInfo		= SemanticSDP.CodecInfo;


//Create new streamer
const streamer = MediaServer.createStreamer();

//Create new video session codecs
const video = new MediaInfo("video","video");

//Add h264 codec
video.addCodec(new CodecInfo("h264",96));

//Create session for video
const session = streamer.createSession(video,{
	local  : {
		port: 5004
	}
});

module.exports = function(request,protocol,endpoint)
{