1 Star 1 Fork 0

St_song/webrtc-streamer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
joinjanusvideoroom.js 838 Bytes
一键复制 编辑 原始数据 按行查看 历史
mpromonet 提交于 2020-10-18 18:33 . replace request with fetch
#!/usr/bin/env node
/*
* NodeJS example to send a webrtc-streamer stream to janus-gateway
*/
// decode arguments
if (process.argv.length < 4) {
console.log("Usage: " + __filename + " <webrtc-streamer url> <videourl> <janus url> <janus room>");
process.exit(-1);
}
var webrtcstreamerurl = process.argv[2];
console.log("webrtcstreamerurl: " + webrtcstreamerurl);
var videourl = process.argv[3];
console.log("videourl: " + videourl);
var janusRoomUrl = process.argv[4];
console.log("janusRoomUrl: " + janusRoomUrl);
var roomId = 1234
if (process.argv.length >= 5) {
roomId = process.argv[5];
}
console.log("roomId: " + roomId);
global.fetch = require("node-fetch");
var JanusVideoRoom = require("./html/janusvideoroom.js");
var janus = new JanusVideoRoom(janusRoomUrl, webrtcstreamerurl);
janus.join(roomId,videourl,"video");
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/203014/webrtc-streamer.git
git@gitee.com:203014/webrtc-streamer.git
203014
webrtc-streamer
webrtc-streamer
master

搜索帮助