feat: 增加密码连接
This commit is contained in:
@@ -35,7 +35,7 @@ export class WebRtcController {
|
||||
this._pendingCandidates = [];
|
||||
}
|
||||
|
||||
async createOffer() {
|
||||
async createOffer(authType = null, authValue = null) {
|
||||
this.pc = new RTCPeerConnection({ iceServers: this.iceServers });
|
||||
|
||||
this.pc.onicecandidate = (e) => {
|
||||
@@ -88,7 +88,7 @@ export class WebRtcController {
|
||||
|
||||
const offer = await this.pc.createOffer();
|
||||
await this.pc.setLocalDescription(offer);
|
||||
this.signaling.sendOffer(this.pc.localDescription.sdp, this.targetDeviceId);
|
||||
this.signaling.sendOffer(this.pc.localDescription.sdp, this.targetDeviceId, authType, authValue);
|
||||
|
||||
this._startStats();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user