效果

前端代码
<template>
<div class="flex items-center flex-col text-center p-12 h-screen">
<div class="relative h-full mb-4 fBox">
<video id="localVideo"></video>
<video id="remoteVideo"></video>
<div v-if="caller && calling">
<p class="mb-4 text-white">等待对方接听...</p>
<img style="width: 60px;" @click="hangUp" src="@/assets/guaDuang.png" alt="">
</div>
<div v-if="called && calling">
<p>收到视频邀请...</p>
<div class="flex">
<img style="width: 60px" @click="hangUp" src="@/assets/guaDuang.png" alt="">
<img style="width: 60px" @click="acceptCall" src="@/assets/jieTing.png" alt="">
</div>
</div>
</div>
<div>
<button @click="callRemote" style="margin-right: 10px">发起视频</button>
<button @click="hangUp" style="margin-left: 10px">挂断视频</button>
</div>
</div>
</template>
<script>
import { io, Socket } from "socket.io-client";
let roomId = '001';
export default {
name: 'HelloWorld',
props: {
msg: String
},
data(){
return{
wsSocket:null,//实例
called:false,// 是否是接收方
caller:false,// 是否是发起方
calling:false,// 呼叫中
communicating:false,// 视频通话中
localVideo:nu