bug
This commit is contained in:
@@ -13,11 +13,11 @@ let micId = '';
|
||||
|
||||
function login() {
|
||||
|
||||
presetting.login(false, options => {
|
||||
presetting.login(0, options => {
|
||||
rtc = new RtcClient(options);
|
||||
join();
|
||||
});
|
||||
presetting.login(true, options => {
|
||||
presetting.login(1, options => {
|
||||
shareUserId = options.userId;
|
||||
share = new ShareClient(options);
|
||||
});
|
||||
@@ -330,6 +330,11 @@ function addMemberView(id) {
|
||||
if($("#" + id)[0]){
|
||||
return ;
|
||||
}
|
||||
let sid = id;
|
||||
sid = sid.split("_")[0]
|
||||
if(sid == "ceshi"){
|
||||
return ;
|
||||
}
|
||||
let memberElm = $('#member-me').clone();
|
||||
memberElm.attr('id', id);
|
||||
// memberElm.attr('class', id);
|
||||
|
||||
@@ -13,11 +13,11 @@ let micId = '';
|
||||
|
||||
function login() {
|
||||
|
||||
presetting.login(false, options => {
|
||||
presetting.login(0, options => {
|
||||
rtc = new RtcClient(options);
|
||||
join();
|
||||
});
|
||||
presetting.login(true, options => {
|
||||
presetting.login(1, options => {
|
||||
shareUserId = options.userId;
|
||||
share = new ShareClient(options);
|
||||
});
|
||||
|
||||
@@ -16,6 +16,15 @@
|
||||
*
|
||||
* Reference:https://cloud.tencent.com/document/product/647/17275#Server
|
||||
*/
|
||||
function jiazai(){
|
||||
document.getElementById("make").style.display = "block"
|
||||
}
|
||||
function tingzhi(){
|
||||
document.getElementById("make").style.display = "none"
|
||||
|
||||
}
|
||||
jiazainum = 0;
|
||||
|
||||
function genTestUserSig(userID) {
|
||||
/**
|
||||
* 腾讯云 SDKAppId,需要替换为您自己账号下的 SDKAppId。
|
||||
@@ -61,11 +70,15 @@ function genTestUserSig(userID) {
|
||||
// userSig:userSig
|
||||
// };
|
||||
return new Promise((res)=>{
|
||||
jiazai()
|
||||
jiazainum++;
|
||||
$.ajax({
|
||||
url: window.url + 'userSig?userid=' + userID,
|
||||
headers: { "Authorization": "Bearer " + localStorage.getItem("token")},
|
||||
success(data){
|
||||
res({data: data.data, id: 1400435767})
|
||||
tingzhi()
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -662,7 +662,7 @@ async function startNetworkTesting() {
|
||||
.appendTo('#screen-share');
|
||||
|
||||
// 上下行网络质量
|
||||
presetting.login(false, async options => {
|
||||
presetting.login(2, async options => {
|
||||
client = TRTC.createClient({ mode: 'rtc', ...options });
|
||||
client.on('network-quality', event => {
|
||||
networkQualityNum++;
|
||||
|
||||
@@ -26,8 +26,10 @@ class Presetting {
|
||||
|
||||
login(share, callback) {
|
||||
let userId = window.mid;
|
||||
if (share) {
|
||||
if (share == 1) {
|
||||
userId = 'share_' + userId;
|
||||
}else if(share == 2){
|
||||
userId = 'ceshi_' + userId;
|
||||
}
|
||||
console.log(userId)
|
||||
|
||||
|
||||
@@ -11,7 +11,19 @@
|
||||
<!-- 引入样式 -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||
<!-- 引入组件库 -->
|
||||
|
||||
<style>
|
||||
#make{
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1001;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
(function (designWidth, maxWidth) {
|
||||
var doc = document,
|
||||
@@ -602,6 +614,8 @@
|
||||
|
||||
|
||||
</script>
|
||||
<div id="make"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -11,7 +11,19 @@
|
||||
<!-- 引入样式 -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||
<!-- 引入组件库 -->
|
||||
|
||||
<style>
|
||||
#make{
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1001;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
(function (designWidth, maxWidth) {
|
||||
var doc = document,
|
||||
@@ -602,6 +614,7 @@
|
||||
|
||||
|
||||
</script>
|
||||
<div id="make"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user