mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-27 12:20:43 +00:00
perf: 会议支持最小化窗口
This commit is contained in:
parent
31ef3a47e0
commit
ae32b3c525
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="false">
|
<div class="meeting-warp">
|
||||||
<!-- 加入/新建 -->
|
<!-- 加入/新建 -->
|
||||||
<Modal
|
<Modal
|
||||||
v-model="addShow"
|
v-model="addShow"
|
||||||
@ -40,6 +40,7 @@
|
|||||||
<Button type="primary" :loading="loadIng > 0" @click="onSubmit">{{$L(addData.type === 'join' ? '加入会议' : '开始会议')}}</Button>
|
<Button type="primary" :loading="loadIng > 0" @click="onSubmit">{{$L(addData.type === 'join' ? '加入会议' : '开始会议')}}</Button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<!-- 会议中 -->
|
<!-- 会议中 -->
|
||||||
<Modal
|
<Modal
|
||||||
v-model="meetingShow"
|
v-model="meetingShow"
|
||||||
@ -49,7 +50,7 @@
|
|||||||
:closable="false"
|
:closable="false"
|
||||||
:transition-names="['', '']"
|
:transition-names="['', '']"
|
||||||
:beforeClose="onClose"
|
:beforeClose="onClose"
|
||||||
class-name="meeting-manager"
|
:class-name="`meeting-manager${meetingMini ? ' meeting-hidden' : ''}`"
|
||||||
fullscreen>
|
fullscreen>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-if="localUser.uid">
|
<li v-if="localUser.uid">
|
||||||
@ -67,9 +68,22 @@
|
|||||||
<i class="taskfont" v-html="localUser.videoTrack ? '' : ''"></i>
|
<i class="taskfont" v-html="localUser.videoTrack ? '' : ''"></i>
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="primary" @click="onInvitation('open')">{{$L('邀请')}}</Button>
|
<Button type="primary" @click="onInvitation('open')">{{$L('邀请')}}</Button>
|
||||||
|
<Button type="primary" @click="meetingMini = true">{{$L('最小化')}}</Button>
|
||||||
<Button type="warning" :loading="loadIng > 0" @click="onClose">{{$L('离开会议')}}</Button>
|
<Button type="warning" :loading="loadIng > 0" @click="onClose">{{$L('离开会议')}}</Button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
<DragBallComponent
|
||||||
|
v-if="meetingMini"
|
||||||
|
id="meetingDragBall"
|
||||||
|
:z-index="3000"
|
||||||
|
@on-click="meetingMini=false">
|
||||||
|
<div class="meeting-drag-ball">
|
||||||
|
<i class="taskfont" v-html="localUser.audioTrack ? '' : ''"></i>
|
||||||
|
<i class="taskfont" v-html="localUser.videoTrack ? '' : ''"></i>
|
||||||
|
<em>{{$L('会议中')}}</em>
|
||||||
|
</div>
|
||||||
|
</DragBallComponent>
|
||||||
|
|
||||||
<!-- 邀请 -->
|
<!-- 邀请 -->
|
||||||
<Modal
|
<Modal
|
||||||
v-model="invitationShow"
|
v-model="invitationShow"
|
||||||
@ -93,10 +107,11 @@ import UserInput from "../../../components/UserInput";
|
|||||||
import {Store} from "le5le-store";
|
import {Store} from "le5le-store";
|
||||||
import {mapState} from "vuex";
|
import {mapState} from "vuex";
|
||||||
import MeetingPlayer from "./MeetingPlayer";
|
import MeetingPlayer from "./MeetingPlayer";
|
||||||
|
import DragBallComponent from "../../../components/DragBallComponent";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MeetingManager",
|
name: "MeetingManager",
|
||||||
components: {MeetingPlayer, UserInput},
|
components: {DragBallComponent, MeetingPlayer, UserInput},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loadIng: 0,
|
loadIng: 0,
|
||||||
@ -115,6 +130,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
meetingShow: false,
|
meetingShow: false,
|
||||||
|
meetingMini: false,
|
||||||
audioLoad: false,
|
audioLoad: false,
|
||||||
videoLoad: false,
|
videoLoad: false,
|
||||||
|
|
||||||
@ -198,7 +214,7 @@ export default {
|
|||||||
delete data.name;
|
delete data.name;
|
||||||
delete data.msgs;
|
delete data.msgs;
|
||||||
//
|
//
|
||||||
$A.loadScript('js/AgoraRTC_N-4.11.1.js', e => {
|
$A.loadScript('js/AgoraRTC_N-4.14.2.js', e => {
|
||||||
if (e !== null || typeof AgoraRTC !== 'object') {
|
if (e !== null || typeof AgoraRTC !== 'object') {
|
||||||
$A.modalError("会议组件加载失败!");
|
$A.modalError("会议组件加载失败!");
|
||||||
} else {
|
} else {
|
||||||
@ -314,16 +330,20 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.addData.tracks.includes("video")) {
|
if (this.addData.tracks.includes("video")) {
|
||||||
localTracks.push(this.localUser.videoTrack = await AgoraRTC.createCameraVideoTrack())
|
localTracks.push(this.localUser.videoTrack = await AgoraRTC.createCameraVideoTrack())
|
||||||
this.$refs[`meeting_${this.localUser.uid}`].play('video')
|
|
||||||
}
|
}
|
||||||
// 将本地视频曲目播放到本地浏览器、将本地音频和视频发布到频道。
|
// 将本地视频曲目播放到本地浏览器、将本地音频和视频发布到频道。
|
||||||
if (localTracks.length > 0) {
|
if (localTracks.length > 0) {
|
||||||
await this.agoraClient.publish(localTracks);
|
await this.agoraClient.publish(localTracks);
|
||||||
}
|
}
|
||||||
//
|
// 显示会议窗口后再调用播放
|
||||||
this.loadIng--;
|
this.loadIng--;
|
||||||
this.addShow = false;
|
this.addShow = false;
|
||||||
this.meetingShow = true;
|
this.meetingShow = true;
|
||||||
|
if (this.addData.tracks.includes("video")) {
|
||||||
|
this.$nextTick(_ => {
|
||||||
|
this.$refs[`meeting_${this.localUser.uid}`].play('video')
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async leave() {
|
async leave() {
|
||||||
|
|||||||
@ -66,6 +66,30 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.meeting-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.meeting-drag-ball {
|
||||||
|
position: relative;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 6px 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> i {
|
||||||
|
font-size: 20px;
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
> em {
|
||||||
|
font-style: normal;
|
||||||
|
padding-left: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.meeting-button-group {
|
.meeting-button-group {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user