| | |
| | | </button> |
| | | |
| | | <!-- 挂断按钮 --> |
| | | <button |
| | | v-if="isCalling" |
| | | class="end-call-btn" |
| | | @click="endCall" |
| | | > |
| | | 挂断 |
| | | </button> |
| | | <button v-if="isCalling" class="end-call-btn" @click="endCall">挂断</button> |
| | | |
| | | <!-- 音频元素(隐藏) --> |
| | | <audio id="remoteAudio" autoplay></audio> |
| | |
| | | callStatus: 'idle', // idle, calling, connected, ended |
| | | sipStatus: "未连接", |
| | | sipStatusClass: "status-disconnected", |
| | | randomNum = Math.floor(Math.random() * 21) + 1000, // 生成 1000-1020 的随机整数 |
| | | sipConfig: { |
| | | wsUrl: "wss://192.168.100.6:7443", |
| | | sipUri: "1000@192.168.100.6", |
| | | sipUri: `${randomNum}`+"@192.168.100.6", |
| | | password: "Smartor@2023", |
| | | displayName: "Web 小龙", |
| | | }, |