vue.js - RtcMulticonnection 加入无间
问题描述
我制作了一个非常简单的RTCMulticonnection应用程序来尝试创建一个小型视频会议应用程序。但是它不断发送相同的请求:
https://rtcmulticonnection.herokuapp.com/socket.io/?
userid=b1nxbxqjvhd&sessionid=mywebsite&msgEvent=RTCMultiConnection-
Message&socketCustomEvent=RTCMultiConnection-Custom Message&autoCloseEntireSession=false&maxParticipantsAllowed=1000&extra=%7B%7D&EIO=4&transport=polling&t=NaOzrYK
但没有出现视频源,好像我没有加入房间..
这是代码:
<template>
<div class="main-container">
<vue-webrtc ref="BaseWRTC"
width="100%"
roomId="Base"
socketURL="https://rtcmulticonnection.herokuapp.com:443/" />
<button type="button" class="btn btn-primary" @click="joinBase">Join using vue-webrtc</button>
<button type="button" class="btn btn-primary" @click="joinrtc()">Join using rtcmulticonnection </button>
</div>
</template>
<script>
import Vue from 'vue'
import WebRTC from 'vue-webrtc'
import * as rtcmulticonnection from 'rtcmulticonnection';
import * as io from 'socket.io-client'
window.io = io
//
Vue.use(WebRTC);
export default {
data() {
return {
}
},
methods: {
joinrtc() {
alert("joining")
var connection = new rtcmulticonnection();
connection.socketURL = 'https://rtcmulticonnection.herokuapp.com:443/';
connection.session = {
audio: true,
video: true
};
connection.openOrJoin('myroom19');
},
joinBase() {
this.$refs.BaseWRTC.join();
},
},
mounted() {},
};
</script>
使用 vue-webrtc 和 rtcmulticonnection 都给了我相同的结果。
感谢您的阅读!
解决方案
我遇到过同样的问题。我通过将 socket.io 降级到 2.2.0 解决了这个问题。
推荐阅读
- java - Project Reactor,在创建 lambda 之外使用 Flux sink
- excel - 我想在不使用 sendkeys 的情况下自动化 F2+Enter。我从单词表中提取的文本没有任何作用
- solr - 使用版本号更新 SOLR 模式
- java - 如何使用 JAVA Apache httpclient 通过 rest api 更新共享点文档的元数据?
- sql - 重命名文件源
- flutter - 颤振等效于 layout_gravity="bottom"
- sql - 通过查找顺序递归查询排序
- android - 有什么方法可以传输数据说在 inappbrowser 中定义的变量并在 executeScript 方法中传递它的值?
- c# - 尝试使用 cmsImport 从逗号分隔的字符串导入到 MultipleTextstring
- c - 等待条件变量的线程是否可以被在等待之前发出的信号唤醒