| | |
| | | <p v-if="isHostMode" class="label">{{ $t('会议操作') }}</p> |
| | | <div class="control-container"> |
| | | <div class="rtc-control-container"> |
| | | <el-button |
| | | <!-- <el-button |
| | | class="button" |
| | | type="primary" |
| | | size="small" :disabled="isJoining || isJoined" @click="handleJoinRoom">{{ $t('加入房间') }}</el-button> |
| | | <el-button |
| | | size="small" :disabled="isJoining || isJoined" @click="handleJoinRoom">{{ $t('加入房间') }}</el-button> --> |
| | | <!-- <el-button |
| | | v-if="isHostMode" |
| | | class="button" |
| | | type="primary" |
| | |
| | | <el-button |
| | | v-if="isHostMode" |
| | | class="button" |
| | | type="primary" size="small" @click="handleUnpublish">{{ $t('Unpublish') }}</el-button> |
| | | <el-button |
| | | type="primary" size="small" @click="handleUnpublish">{{ $t('Unpublish') }}</el-button> --> |
| | | <!-- <el-button |
| | | class="button" |
| | | type="primary" size="small" @click="handleLeave">{{ $t('离开房间') }}</el-button> |
| | | type="primary" size="small" @click="handleLeave">{{ $t('离开房间') }}</el-button> --> |
| | | </div> |
| | | <div v-if="isHostMode" class="screen-share-control-container"> |
| | | <el-button |
| | | class="button" |
| | | type="primary" |
| | | size="small" |
| | | :disabled="isShareJoined && isSharePublished" |
| | | :disabled="(isShareJoined && isSharePublished) || disable" |
| | | @click="handleStartScreenShare">{{ $t('共享屏幕') }}</el-button> |
| | | <el-button |
| | | class="button" |
| | | type="primary" size="small" @click="handleStopScreenShare">{{ $t('结束屏幕共享') }}</el-button> |
| | | type="primary" size="small" @click="handleStopScreenShare" :disabled='disable'>{{ $t('结束屏幕共享') }}</el-button> |
| | | <el-button |
| | | class="button" |
| | | type="primary" size="small" @click="handleLeave" :disabled='disable'>{{ $t('离开房间') }}</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | |
| | | <div class="info-container" :class="$isMobile && 'info-container-mobile'"> |
| | | <!-- Log 展示区域 --> |
| | | <div v-if="isHostMode" class="log-container" ref="logContainer"> |
| | | <p class="log-label">Log:</p> |
| | | <div v-for="(item, index) in logList" :key="index"> |
| | | <span class="log-state" v-if="item.type === 'success'">🟩 </span> |
| | | <span class="log-state" v-if="item.type === 'failed'">🟥 </span> |
| | | <span>{{ item.log }}</span> |
| | | </div> |
| | | <div v-if="isHostMode" class="log-container" ref="logContainer"> |
| | | <!-- <p class="log-label">Log:</p> --> |
| | | <!-- <div v-for="(item, index) in logList" :key="index"> --> |
| | | <!-- <span class="log-state" v-if="item.type === 'success'">🟩 </span> --> |
| | | <!-- <span class="log-state" v-if="item.type === 'failed'">🟥 </span> --> |
| | | <!-- <span>{{ item.log }}</span> --> |
| | | <!-- </div> --> |
| | | </div> |
| | | |
| | | <!-- 本地流区域 --> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | disable:false, |
| | | logList: [], |
| | | inviteLink: '', |
| | | showCopiedTip: false, |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted(){ |
| | | this.handleJoinRoom(); |
| | | }, |
| | | computed: { |
| | | isHostMode() { |
| | |
| | | } |
| | | const { sdkAppId, secretKey, roomId } = this; |
| | | const inviteUserId = `user_${parseInt(Math.random() * 100000000, 10)}`; |
| | | alert(123) |
| | | // alert(123) |
| | | const userSigGenerator = new LibGenerateTestUserSig(sdkAppId, secretKey, 604800); |
| | | const inviteUserSig = userSigGenerator.genTestUserSig(inviteUserId); |
| | | this.inviteLink = encodeURI(`${location.origin}${location.pathname}#/invite?sdkAppId=${sdkAppId}&userSig=${inviteUserSig}&roomId=${roomId}&userId=${inviteUserId}`); |
| | |
| | | alert(this.$t('Please enter userId and roomId')); |
| | | return; |
| | | } |
| | | alert(129) |
| | | // alert(129) |
| | | const userSigGenerator = new LibGenerateTestUserSig(this.sdkAppId, this.secretKey, 604800); |
| | | this.userSig = userSigGenerator.genTestUserSig(this.userId); |
| | | } else { |
| | |
| | | // 点击【Leave Room】按钮 |
| | | async handleLeave() { |
| | | await this.leave(); |
| | | this.disable = true |
| | | }, |
| | | |
| | | // 点击【开始屏幕分享】按钮 |
| | |
| | | |
| | | // 显示成功的 Log |
| | | addSuccessLog(log) { |
| | | // alert('加入成功') |
| | | if (!this.isHostMode) { |
| | | return; |
| | | } |
| | |
| | | |
| | | // 显示失败的 Log |
| | | addFailedLog(log) { |
| | | // alert('加入失败') |
| | | if (!this.isHostMode) { |
| | | return; |
| | | } |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .log-container { |
| | | flex-grow: 1; |
| | | border: 1px solid #dddddd; |
| | | height: 360px; |
| | | padding: 10px; |
| | | margin-right: 16px; |
| | | overflow-y: scroll; |
| | | .log-label { |
| | | margin: 0 0 6px; |
| | | font-weight: bold; |
| | | } |
| | | .log-state { |
| | | display: inline-block; |
| | | margin-right: 6px; |
| | | } |
| | | > div { |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | // .log-container { |
| | | // flex-grow: 1; |
| | | // border: 1px solid #dddddd; |
| | | // height: 360px; |
| | | // padding: 10px; |
| | | // margin-right: 16px; |
| | | // overflow-y: scroll; |
| | | // .log-label { |
| | | // margin: 0 0 6px; |
| | | // font-weight: bold; |
| | | // } |
| | | // .log-state { |
| | | // display: inline-block; |
| | | // margin-right: 6px; |
| | | // } |
| | | // > div { |
| | | // font-size: 12px; |
| | | // } |
| | | // } |
| | | .local-stream-container { |
| | | width: 480px; |
| | | height: 360px; |