Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions src/components/CallView/shared/LocalAudioControlButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'no-audio-available': !isAudioAvailable,
'audio-control-button': showDevices,
}"
:disabled="!isAudioAllowed || resumeAudioAfterChange"
:disabled="resumeAudioAfterChange"
@click.stop="toggleAudio">
<template #icon>
<VolumeIndicator
Expand All @@ -41,26 +41,31 @@

<NcActions
v-if="showDevices"
:disabled="!isAudioAvailable || !isAudioAllowed"
:disabled="!isAudioAllowed && !audioOutputSupported"
class="audio-selector-button"
:class="{
'no-audio-available': !isAudioAvailable,
}"
@open="updateDevices">
<template #icon>
<IconChevronUp :size="16" />
</template>
<NcActionCaption :name="t('spreed', 'Select a microphone')" />
<NcActionButton
v-for="device in audioInputDevices"
:key="device.deviceId ?? 'none'"
class="audio-selector__action"
type="radio"
:model-value="audioInputId"
:value="device.deviceId"
:title="device.label"
@click="handleAudioInputIdChange(device.deviceId)">
{{ device.label }}
</NcActionButton>
<template v-if="isAudioAllowed">
<NcActionCaption :name="t('spreed', 'Select a microphone')" />
<NcActionButton
v-for="device in audioInputDevices"
:key="device.deviceId ?? 'none'"
class="audio-selector__action"
type="radio"
:model-value="audioInputId"
:value="device.deviceId"
:title="device.label"
@click="handleAudioInputIdChange(device.deviceId)">
{{ device.label }}
</NcActionButton>
</template>
<NcActionSeparator v-if="isAudioAllowed && audioOutputSupported" />
<template v-if="audioOutputSupported">
<NcActionSeparator />
<NcActionCaption :name="t('spreed', 'Select a speaker')" />
<NcActionButton
v-for="device in audioOutputDevices"
Expand Down Expand Up @@ -295,7 +300,7 @@ export default {
methods: {
t,
toggleAudio() {
if (!this.isAudioAvailable) {
if (!this.isAudioAllowed || !this.isAudioAvailable) {
emit('talk:media-settings:show')
return
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/CallView/shared/LocalVideoControlButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'no-video-available': !isVideoAvailable,
'video-control-button': showDevices,
}"
:disabled="!isVideoAllowed || resumeVideoAfterChange"
:disabled="resumeVideoAfterChange"
@click.stop="toggleVideo">
<template #icon>
<IconVideo v-if="showVideoOn || resumeVideoAfterChange" :size="20" />
Expand Down Expand Up @@ -220,7 +220,7 @@ export default {
methods: {
t,
toggleVideo() {
if (!this.isVideoAvailable) {
if (!this.isVideoAllowed || !this.isVideoAvailable) {
emit('talk:media-settings:show')
return
}
Expand Down
Loading