no message

This commit is contained in:
kuaifan 2022-11-11 16:56:22 +08:00
parent 96a65866db
commit 4e8053470d
14 changed files with 64 additions and 43 deletions

View File

@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.20.64",
"version": "0.20.65",
"description": "DooTask is task management system.",
"scripts": {
"start": "./cmd dev",

2
public/css/app.css vendored

File diff suppressed because one or more lines are too long

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
public/js/build/82.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
92c9278aa827e6c9
c0ec48cb1d98524a

View File

@ -788,21 +788,21 @@
"/js/build/60.js": "/js/build/60.js",
"/js/build/680.js": "/js/build/680.js",
"/js/build/694.js": "/js/build/694.js",
"/js/build/706.js": "/js/build/706.js",
"/js/build/706.js.LICENSE.txt": "/js/build/706.js.LICENSE.txt",
"/js/build/711.js": "/js/build/711.js",
"/js/build/711.js.LICENSE.txt": "/js/build/711.js.LICENSE.txt",
"/js/build/724.js": "/js/build/724.js",
"/js/build/725.js": "/js/build/725.js",
"/js/build/73.js": "/js/build/73.js",
"/js/build/781.js": "/js/build/781.js",
"/js/build/808.js": "/js/build/808.js",
"/js/build/82.js": "/js/build/82.js",
"/js/build/826.js": "/js/build/826.js",
"/js/build/826.js.LICENSE.txt": "/js/build/826.js.LICENSE.txt",
"/js/build/827.js": "/js/build/827.js",
"/js/build/834.js": "/js/build/834.js",
"/js/build/856.js": "/js/build/856.js",
"/js/build/856.js.LICENSE.txt": "/js/build/856.js.LICENSE.txt",
"/js/build/878.js": "/js/build/878.js",
"/js/build/878.js.LICENSE.txt": "/js/build/878.js.LICENSE.txt",
"/js/build/889.js": "/js/build/889.js",
"/js/build/889.js.LICENSE.txt": "/js/build/889.js.LICENSE.txt",
"/js/build/904.js": "/js/build/904.js",

View File

@ -415,7 +415,7 @@ export default {
onPrivacy(agree) {
if (agree) {
this.privacyShow = false
this.inputServerUrl()
this.chackServerUrl().catch(_ => {});
} else {
$A.eeuiAppGoDesktop()
}

View File

@ -54,10 +54,9 @@
fullscreen>
<ul>
<li v-if="localUser.uid">
<MeetingPlayer :player="localUser" :mediaType="localUser.mediaType"/>
</li>
<li v-for="user in remoteUsers">
<MeetingPlayer :player="user" :mediaType="user.mediaType"/>
<MeetingPlayer :player="localUser" isLocal/>
</li><li v-for="user in remoteUsers">
<MeetingPlayer :player="user"/>
</li>
</ul>
<div slot="footer" class="adaption meeting-button-group">
@ -152,7 +151,6 @@ export default {
uid: null,
audioTrack: null,
videoTrack: null,
mediaType: null
},
}
},
@ -343,7 +341,6 @@ export default {
}
if (this.addData.tracks.includes("video")) {
localTracks.push(this.localUser.videoTrack = await AgoraRTC.createCameraVideoTrack())
this.$set(this.localUser, 'mediaType', 'video')
}
//
if (localTracks.length > 0) {
@ -398,7 +395,6 @@ export default {
if (this.videoLoad || this.localUser.videoTrack) return;
this.videoLoad = true;
this.localUser.videoTrack = await AgoraRTC.createCameraVideoTrack()
this.$set(this.localUser, 'mediaType', 'video')
await this.agoraClient.publish([this.localUser.videoTrack]);
this.videoLoad = false;
},
@ -410,12 +406,10 @@ export default {
this.localUser.videoTrack.stop();
this.localUser.videoTrack.close();
this.localUser.videoTrack = null;
this.$set(this.localUser, 'mediaType', null)
this.videoLoad = false;
},
async handleUserJoined(user) {
this.$set(user, 'mediaType', null)
const index = this.remoteUsers.findIndex(item => item.uid == user.uid)
if (index > -1) {
this.remoteUsers.splice(index, 1, user)
@ -435,7 +429,6 @@ export default {
const item = this.remoteUsers.find(item => item.uid == user.uid)
if (item) {
await this.agoraClient.subscribe(user, mediaType);
this.$set(item, 'mediaType', mediaType)
}
},
@ -443,7 +436,6 @@ export default {
const item = this.remoteUsers.find(item => item.uid == user.uid)
if (item) {
await this.agoraClient.unsubscribe(user, mediaType);
item.mediaType = null
}
}
}

View File

@ -10,7 +10,6 @@
</template>
<script>
import {mapState} from "vuex";
export default {
@ -26,16 +25,29 @@ export default {
type: Object,
default: () => ({})
},
mediaType: {
type: String,
default: ""
isLocal: {
type: Boolean,
default: false
},
},
data() {
return {
timer: null
}
},
mounted() {
this.timer = setInterval(_ => {
if (this.audio && !this.player.audioTrack.isPlaying) {
this.play('audio')
}
if (this.video && !this.player.videoTrack.isPlaying) {
this.play('video')
}
}, 3000)
},
beforeDestroy() {
clearInterval(this.timer)
},
computed: {
...mapState(['cacheUserBasic']),
userid() {
@ -61,26 +73,38 @@ export default {
}
},
watch: {
mediaType: {
handler(type) {
this.$nextTick(_ => {
this.play(type)
})
audio: {
handler(b) {
if (this.isLocal || !b) {
return
}
this.play('audio')
},
immediate: true
},
video: {
handler(b) {
if (!b) {
return
}
this.play('video')
},
immediate: true
}
},
methods: {
play(type) {
try {
if (type === 'audio') {
this.player.audioTrack.play();
} else if (type === 'video') {
this.player.videoTrack.play(this.id);
this.$nextTick(_ => {
try {
if (type === 'audio') {
this.player.audioTrack.play();
} else if (type === 'video') {
this.player.videoTrack.play(this.id);
}
} catch (e) {
console.log("Meeting Player Error", e);
}
} catch (e) {
console.log("Meeting Player Error", e);
}
})
}
}
}

View File

@ -50,12 +50,17 @@ body {
}
}
@media (max-width: 768px) {
grid-template-columns: repeat(auto-fill, 176px);
grid-template-columns: none;
grid-gap: 12px;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
> li {
width: calc(50% - 6px);
max-width: 180px;
.meeting-player {
.player {
width: 176px;
width: 100%;
height: 176px;;
}
}

@ -1 +1 @@
Subproject commit f47841bc5e1ebc94f9f507b6818f29698d973f86
Subproject commit 0342e81ff1729ad070a13eca2df61f53f554d7b5