Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable22] Initialize the wav encoder in the entry points instead of in the audiorecorder component #6012

Merged
merged 1 commit into from Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/App.vue
Expand Up @@ -66,6 +66,8 @@ import UploadEditor from './components/UploadEditor'
import SettingsDialog from './components/SettingsDialog/SettingsDialog'
import ConversationSettingsDialog from './components/ConversationSettings/ConversationSettingsDialog'
import '@nextcloud/dialogs/styles/toast.scss'
import { register } from 'extendable-media-recorder'
import { connect } from 'extendable-media-recorder-wav-encoder'

export default {
name: 'App',
Expand Down Expand Up @@ -325,7 +327,7 @@ export default {
}
},

mounted() {
async mounted() {
// see browserCheck mixin
this.checkBrowser()
// Check sidebar status in previous sessions
Expand All @@ -334,6 +336,8 @@ export default {
} else if (BrowserStorage.getItem('sidebarOpen') === 'true') {
this.$store.dispatch('showSidebar')
}

register(await connect())
},

methods: {
Expand Down
7 changes: 7 additions & 0 deletions src/FilesSidebarTabApp.vue
Expand Up @@ -66,6 +66,8 @@ import ChatView from './components/ChatView'
import sessionIssueHandler from './mixins/sessionIssueHandler'
import browserCheck from './mixins/browserCheck'
import '@nextcloud/dialogs/styles/toast.scss'
import { register } from 'extendable-media-recorder'
import { connect } from 'extendable-media-recorder-wav-encoder'

export default {

Expand Down Expand Up @@ -138,6 +140,11 @@ export default {
},
},

async mounted() {
// Initialise audiorecorder encoder
register(await connect())
},

created() {
// The fetchCurrentConversation event handler/callback is started and
// stopped from different FilesSidebarTabApp instances, so it needs to
Expand Down
7 changes: 7 additions & 0 deletions src/PublicShareAuthSidebar.vue
Expand Up @@ -47,6 +47,8 @@ import {
import { signalingKill } from './utils/webrtc/index'
import sessionIssueHandler from './mixins/sessionIssueHandler'
import talkHashCheck from './mixins/talkHashCheck'
import { register } from 'extendable-media-recorder'
import { connect } from 'extendable-media-recorder-wav-encoder'

export default {

Expand Down Expand Up @@ -97,6 +99,11 @@ export default {
},
},

async mounted() {
// Initialise audiorecorder encoder
register(await connect())
},

beforeMount() {
window.addEventListener('unload', () => {
console.info('Navigating away, leaving conversation')
Expand Down
7 changes: 7 additions & 0 deletions src/PublicShareSidebar.vue
Expand Up @@ -61,6 +61,8 @@ import isInCall from './mixins/isInCall'
import participant from './mixins/participant'
import talkHashCheck from './mixins/talkHashCheck'
import '@nextcloud/dialogs/styles/toast.scss'
import { register } from 'extendable-media-recorder'
import { connect } from 'extendable-media-recorder-wav-encoder'

export default {

Expand Down Expand Up @@ -131,6 +133,11 @@ export default {
})
},

async mounted() {
// Initialise audiorecorder encoder
await register(await connect())
},

methods: {

async joinConversation() {
Expand Down
Expand Up @@ -78,8 +78,7 @@ import Check from 'vue-material-design-icons/Check'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import { mediaDevicesManager } from '../../../utils/webrtc/index'
import { showError } from '@nextcloud/dialogs'
import { MediaRecorder, register } from 'extendable-media-recorder'
import { connect } from 'extendable-media-recorder-wav-encoder'
import { MediaRecorder } from 'extendable-media-recorder'

export default {
name: 'AudioRecorder',
Expand Down Expand Up @@ -156,10 +155,6 @@ export default {
},
},

async mounted() {
await register(await connect())
},

beforeDestroy() {
this.killStreams()
},
Expand Down