我已经安装并配置了Prosody服务器.它侦听标准localhost:5222.在配置文件中添加了admin - user1@example.com.对服务器的每个请求都以错误结束:
<stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" id="" version="1.0">
<stream:error>
<not-well-formed xmlns="urn:ietf:params:xml:ns:xmpp-streams"/>
</stream:error>
</stream:stream>
Run Code Online (Sandbox Code Playgroud)
作为客户,我想使用strophe.js.我只发送存在节($ pres).这是我的代码.
'use strict';
angular.module('xmppTestApp')
.controller('ChatCtrl', function () {
var vm = this;
var url = "http://localhost:5222";
var connection = null;
var output = document.getElementById("output");
function log(message) {
var line = document.createElement("div");
line.textContent = message;
output.appendChild(line);
}
function connectHandler(cond) {
if (cond == Strophe.Status.CONNECTED) {
log("connected");
connection.send($pres());
}
else {
log("not connected");
}
}
vm.connectB = function() {
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
console.info(url); …Run Code Online (Sandbox Code Playgroud) 我对 xmpp 和 webrtc 比较陌生。现在,我尝试使用 Jitsi Videobridge 和 prosody 创建简单的视频会议 Web 应用程序,我不想使用 jitsi-meet,因为我需要知道如何让 jitsi-videobridge 工作的基本知识。到现在为止,我可以通过韵律来接受 jitsi-videobridge 组件。所以当我运行./jvb.sh --domain=localhost --port=5347 --secret=componentsecret它会显示这些日志:
JVB 2017-04-21 10:52:53.798 INFO: [38]
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-340"
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:03.801 INFO: [40]
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-341"
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:13.801 INFO: [42]
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-342"
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:23.801 INFO: [44]
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-343"
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:33.801 INFO: [46]
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-344"
type="result" …Run Code Online (Sandbox Code Playgroud)