-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shaohongsheng
committed
Feb 7, 2024
1 parent
1bd34d5
commit 7099709
Showing
1 changed file
with
96 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
<!-- <link rel="apple-touch-icon-precomposed" href="https://brtc-sdk.cdn.bcebos.com/logo/rtc-logo.png"> --> | ||
<script type="text/javascript" src="https://code.bdstatic.com/npm/[email protected]/dist/jquery.min.js" ></script> | ||
<script type="text/javascript" src="https://code.bdstatic.com/npm/[email protected]/jquery.blockUI.js" ></script> | ||
<script type="text/javascript" src="https://brtc-sdk.cdn.bcebos.com/npm/[email protected].13/baidu.rtc.sdk.js" ></script> | ||
<script type="text/javascript" src="https://brtc-sdk.cdn.bcebos.com/npm/[email protected].14/baidu.rtc.sdk.js" ></script> | ||
<script type="text/javascript" src="https://code.bdstatic.com/npm/[email protected]/demo/js.cookie.js"></script> | ||
<link rel="stylesheet" href="https://code.bdstatic.com/npm/[email protected]/cerulean/bootstrap.min.css" type="text/css"> | ||
<link rel="stylesheet" href="https://code.bdstatic.com/npm/[email protected]/demo/css/demo.css" type="text/css"> | ||
|
@@ -45,6 +45,69 @@ | |
.gotobd a.subxm{color:#505050;} | ||
table,table tr th, table tr td { border:1px solid #0094ff; } | ||
table { width: 800px; min-height: 25px; line-height: 25px; text-align: left; border-collapse: collapse;} | ||
|
||
.s-bottom-layer { | ||
color: #000; | ||
--bubble-width: 140px; | ||
--bubble-padding-left: 164px; | ||
font-size: 12px; | ||
font-family: Arial,sans-serif; | ||
text-align: center; | ||
cursor: default; | ||
position: fixed; | ||
z-index: 302; | ||
bottom: 0; | ||
left: 0; | ||
height: 29px; | ||
padding-top: 1px; | ||
zoom: 1; | ||
margin: 0; | ||
line-height: 29px; | ||
background: #fff; | ||
} | ||
|
||
.s-bottom-layer-content { | ||
color: #000; | ||
--bubble-width: 140px; | ||
--bubble-padding-left: 164px; | ||
font-size: 12px; | ||
font-family: Arial,sans-serif; | ||
cursor: default; | ||
line-height: 29px; | ||
visibility: visible; | ||
margin: 0 17px; | ||
text-align: center; | ||
} | ||
|
||
.lh { | ||
-webkit-text-size-adjust: 100%; | ||
-webkit-tap-highlight-color: rgba(0,0,0,0); | ||
font: 12px/1.14 "PingFang-SC-Medium"; | ||
color: #000; | ||
--bubble-width: 140px; | ||
--bubble-padding-left: 164px; | ||
font-size: 12px; | ||
font-family: Arial,sans-serif; | ||
cursor: default; | ||
line-height: 29px; | ||
visibility: visible; | ||
text-align: center; | ||
box-sizing: border-box; | ||
margin: 0 0 10px; | ||
} | ||
|
||
.text-color { | ||
--bubble-width: 140px; | ||
--bubble-padding-left: 164px; | ||
font-family: Arial,sans-serif; | ||
line-height: 29px; | ||
visibility: visible; | ||
text-align: center; | ||
font-size: 12px; | ||
text-decoration: none; | ||
color: #bbb; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
|
@@ -110,6 +173,7 @@ | |
var gLog = false; | ||
var gName = 'brtc webclient'; | ||
var gMultiStreamSDK = false; | ||
var gBRTCProtocolV4 = false; | ||
var gVideoCodec = 'h264'; // 'vp8', 'vp9', 'h263', 'h265', 'h266', 'av1' | ||
var gAudioCodec = ''; // 'opus', 'pcmu', 'pcma', 'g722', 'isac16', 'isac32' | ||
|
||
|
@@ -268,7 +332,7 @@ | |
$('#feedid').change(function () { | ||
var myfeedid = parseInt($('#feedid').val(), 10); | ||
if (myfeedid !== 999999999) { | ||
if (last_sub_feedid != 0){ | ||
if (last_sub_feedid !== 0 && last_sub_feedid !== myfeedid){ | ||
var that_sub_feedid = last_sub_feedid; | ||
setTimeout((x) =>{ | ||
BRTC_StopSubscribeStreaming(that_sub_feedid); | ||
|
@@ -462,6 +526,10 @@ | |
gMultiStreamSDK = true; | ||
} | ||
|
||
if (gRequest['v4']) { | ||
gBRTCProtocolV4 = true; | ||
} | ||
|
||
if (gRequest['videocodec']) { | ||
gVideoCodec = gRequest['videocodec']; | ||
} | ||
|
@@ -606,6 +674,7 @@ | |
screensharevideoprofile: gScreenProfile, | ||
// screensharevideoprofile: 'lowres','stdres','hires','fhdres','4kres','1280x720' | ||
multistream: gMultiStreamSDK, | ||
v4: gBRTCProtocolV4, | ||
linkdownevent: function () { | ||
console.log('linkdownevent'); | ||
}, | ||
|
@@ -619,6 +688,14 @@ | |
}, | ||
userevent_leavingroom: function (id, display) { | ||
console.log('userevent_leavingroom id: ' + id + ', display: ' + display); | ||
let sel = document.getElementById('feedid'); | ||
|
||
for (const e in sel.options) { | ||
if (sel.options[e].value == id) { | ||
sel.options.remove(e); | ||
return; | ||
} | ||
} | ||
}, | ||
sessionevent: gSessionEvent, | ||
mediastate: function (medium, on) { | ||
|
@@ -984,6 +1061,12 @@ | |
}, 1000); | ||
} | ||
|
||
function OnGotoMeetingDemo() { | ||
window.location.href ='https://brtc-sdk.cdn.bcebos.com/web/demo/meeting/index.html' + | ||
'#home' + (window.location.search || ('?a=' + $('#appid').val() + | ||
'&r=' + $('#roomname').val())); | ||
} | ||
|
||
</script> | ||
|
||
<div class="gotoBaidu"> | ||
|
@@ -1335,6 +1418,16 @@ | |
<td>test=1</td> | ||
</tr> | ||
</table> | ||
|
||
<p style="height:29px;"> | ||
</p> | ||
<div id="bottom_layer" class="s-bottom-layer" style="visibility: visible; width: 100%;"> | ||
<div class="s-bottom-layer-content"> | ||
<p class="lh"> | ||
<a class="text-color" href="#wiki">Wiki</a> | ||
<a class="text-color" href="#" onclick="OnGotoMeetingDemo()" target="_blank">视频会议</a> | ||
<a class="text-color" href="https://cloud.baidu.com/product/rtc.html" target="_blank">BRTC</a> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |