[*] 优化
This commit is contained in:
@@ -57,7 +57,7 @@ const defaultRPCConfig = {
|
||||
/** 信令配置 */
|
||||
const signalConfig = {
|
||||
/** 当前终端SN */
|
||||
sn: 'taoyao',
|
||||
sn: localStorage.getItem('taoyao.sn', 'taoyao'),
|
||||
/** 当前版本 */
|
||||
version: '1.0.0',
|
||||
// 信令授权
|
||||
@@ -484,7 +484,8 @@ function Taoyao(
|
||||
/** WebRTC配置 */
|
||||
this.webrtc = null;
|
||||
/** WebSocket地址 */
|
||||
this.webSocket = webSocket;
|
||||
// "wss://192.168.1.100:8888/websocket.signal"
|
||||
this.webSocket = webSocket || 'wss://' + location.host + '/websocket.signal';
|
||||
/** 设备状态 */
|
||||
this.audioEnabled = true;
|
||||
this.videoEnabled = true;
|
||||
|
||||
@@ -50,16 +50,8 @@
|
||||
meetingId: null
|
||||
},
|
||||
mounted() {
|
||||
// 随机终端标识
|
||||
if(signalConfig.sn === 'taoyao') {
|
||||
let sn = localStorage.getItem('taoyao.sn');
|
||||
if(sn) {
|
||||
signalConfig.sn = sn;
|
||||
}
|
||||
console.debug('终端标识', sn);
|
||||
}
|
||||
let self = this;
|
||||
this.taoyao = new Taoyao("wss://192.168.1.100:8888/websocket.signal");
|
||||
this.taoyao = new Taoyao();
|
||||
this.remoteClient = this.taoyao.remoteClient;
|
||||
// 打开信令通道
|
||||
this.taoyao
|
||||
|
||||
Reference in New Issue
Block a user