代码拉取完成,页面将自动刷新
同步操作将从 mirrors_mpromonet/webrtc-streamer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env node
/*
* NodeJS example to send a webrtc-streamer stream to jitsi
*/
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
// decode arguments
if (process.argv.length <= 4) {
console.log("Usage: " + __filename + " <webrtc-streamer url> <videourl> <xmpp url> <xmpp room>");
process.exit(-1);
}
var webrtcstreamerurl = process.argv[2];
console.log("webrtcstreamerurl: " + webrtcstreamerurl);
var videourl = process.argv[3];
console.log("videourl: " + videourl);
var xmppRoomUrl = process.argv[4];
console.log("xmppRoomUrl: " + xmppRoomUrl);
var xmppRoomId = "testroom"
if (process.argv.length >= 5) {
xmppRoomId = process.argv[5];
}
console.log("xmppRoomId: " + xmppRoomId);
var jsdom = require("jsdom");
const { JSDOM } = jsdom;
const { window } = new JSDOM("");
global.jquery = require("jquery")(window);
global.$ = (selector,context) => {return new jquery.fn.init(selector,context); };
global.window = window;
global.document = window.document;
global.DOMParser = window.document.DOMParser;
global.XMLHttpRequest = window.XMLHttpRequest;
var strophe = require("strophe.js");
global.Strophe = strophe.Strophe;
global.$iq = strophe.$iq;
//global.Strophe.log = console.log;
require("strophejs-plugin-disco");
require("strophejs-plugin-muc");
global.SDP = require("strophe.jingle/strophe.jingle.sdp.js");
global.fetch = require("node-fetch");
var XMPPVideoRoom = require("./html/xmppvideoroom.js");
var xmpp = new XMPPVideoRoom(xmppRoomUrl, webrtcstreamerurl);
var username = "user"+Math.random().toString(36).slice(2);
console.log("join " + xmppRoomId + "/" + username);
xmpp.join(xmppRoomId,videourl,username);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。