From 16adb91ef5ffc84f05d622ad7130c6fac7646ca4 Mon Sep 17 00:00:00 2001 From: jvJUCA Date: Tue, 25 Jun 2024 16:48:53 -0300 Subject: [PATCH] fix: using video tag instead of audio for compatibility purposes --- src/components/molecules/FeedbackView.vue | 1 + src/views/public/ModeratedTestView.vue | 16 +++------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/components/molecules/FeedbackView.vue b/src/components/molecules/FeedbackView.vue index 2c109c493..5ea5f646c 100644 --- a/src/components/molecules/FeedbackView.vue +++ b/src/components/molecules/FeedbackView.vue @@ -79,6 +79,7 @@ export default { }, methods: { setupStreams() { + console.log('setupStreams') this.$refs.localMedia.srcObject = this.localCameraStream this.$refs.remoteMedia.srcObject = this.remoteCameraStream }, diff --git a/src/views/public/ModeratedTestView.vue b/src/views/public/ModeratedTestView.vue index 80f6edaa4..29823a641 100644 --- a/src/views/public/ModeratedTestView.vue +++ b/src/views/public/ModeratedTestView.vue @@ -837,7 +837,7 @@ - + @@ -1172,17 +1172,7 @@ export default { }) }, async setRemoteAudio() { - if ( - this.remoteCameraScreen && - this.remoteCameraScreen.getAudioTracks().length > 0 - ) { - let audioTrack = this.remoteCameraScreen - .getTracks() - .find((track) => track.kind == 'audio') - const audioStream = new MediaStream([audioTrack]) - this.$refs.remoteAudio.srcObject = audioStream - this.$refs.remoteAudio.play() - } + this.$refs.remoteAudio.srcObject = this.remoteCameraStream }, async uploadVideo(recordedChunks, storagePath) { const videoBlob = new Blob(recordedChunks, { type: 'video/webm' }) @@ -1258,6 +1248,7 @@ export default { async startRecordingModerator() { this.recording = true this.recordedChunksModerator = [] + const storagePath = `tests/${this.roomTestId}/${this.token}/moderator/video/${this.recordedVideoModerator}` let moderatorCamera = await navigator.mediaDevices.getUserMedia({ video: true, audio: true, @@ -1272,7 +1263,6 @@ export default { this.mediaRecorderModerator.onstop = async () => { this.isLoading = true - const storagePath = `tests/${this.roomTestId}/${this.token}/moderator/video/${this.recordedVideoModerator}` try { this.recordedVideoModerator = await this.uploadVideo( this.recordedChunksModerator,