How to use the medooze-media-server.setPortRange 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 medooze / media-server-demo-node / index.js View on Github external
//Create UDP server endpoint
const endpoint = MediaServer.createEndpoint(ip);

const base = 'www';

const options = {
	key: fs.readFileSync ('server.key'),
	cert: fs.readFileSync ('server.cert')
};

//Enable debug
MediaServer.enableDebug(false);
MediaServer.enableUltraDebug(false);

//Restrict port range
MediaServer.setPortRange(10000,20000);

// maps file extention to MIME typere
const map = {
	'.ico': 'image/x-icon',
	'.html': 'text/html',
	'.js': 'text/javascript',
	'.json': 'application/json',
	'.css': 'text/css',
	'.png': 'image/png',
	'.jpg': 'image/jpeg',
	'.wav': 'audio/wav',
	'.mp3': 'audio/mpeg',
	'.svg': 'image/svg+xml',
	'.pdf': 'application/pdf',
	'.doc': 'application/msword'
};
github medooze / media-server-client-js / demo / index.js View on Github external
//Create UDP server endpoint
const endpoint = MediaServer.createEndpoint(ip);

const base = 'www';

const options = {
	key: fs.readFileSync ('server.key'),
	cert: fs.readFileSync ('server.cert')
};

//Enable debug
MediaServer.enableDebug(true);
MediaServer.enableUltraDebug(true);

//Restrict port range
MediaServer.setPortRange(10000,20000);

// maps file extention to MIME typere
const map = {
	'.ico': 'image/x-icon',
	'.html': 'text/html',
	'.js': 'text/javascript',
	'.json': 'application/json',
	'.css': 'text/css',
	'.png': 'image/png',
	'.jpg': 'image/jpeg',
	'.wav': 'audio/wav',
	'.mp3': 'audio/mpeg',
	'.svg': 'image/svg+xml',
	'.pdf': 'application/pdf',
	'.doc': 'application/msword'
};
github RTCEngine / RTCEngine-server / medianode / server.ts View on Github external
super()

        this.params = params

        if (params.endpoint) {
            config.endpoint = params.endpoint
        }

        if (params.capabilities){
            config.capabilities = params.capabilities
        }
        
        MedoozeMediaServer.enableLog(config.log)
        MedoozeMediaServer.enableDebug(config.debug)
        MedoozeMediaServer.enableUltraDebug(config.ultraDebug)
        MedoozeMediaServer.setPortRange(config.minMediaPort, config.maxMediaPort)
        
        this.app = express()

        //configure application
        this.config()

        //add routes
        this.routes()
    }