summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-06-24 11:16:43 +0200
committerGitHub <noreply@github.com>2021-06-24 11:16:43 +0200
commita2001262e6c334c6c147effd1cb701cc6edaf4a2 (patch)
treec5a5954f71ff254454957126930f45c8c0b2b1e3
parent0f88cbf55d53b953895941e7d002f3cd03b45676 (diff)
parentad7584b69c3df0a06e5410b36ba08d5ab7ab4648 (diff)
Merge pull request #5865 from nextcloud/bugfix/5861/allow-selecting-own-screen-again
Fix selecting the own screen in the gridview
-rw-r--r--src/components/CallView/CallView.vue17
-rw-r--r--src/components/CallView/Grid/Grid.vue8
-rw-r--r--src/components/CallView/shared/LocalMediaControls.vue2
-rw-r--r--src/components/CallView/shared/LocalVideo.vue6
-rw-r--r--src/components/CallView/shared/VideoBottomBar.vue2
5 files changed, 23 insertions, 12 deletions
diff --git a/src/components/CallView/CallView.vue b/src/components/CallView/CallView.vue
index 52dce2f7d..ab2eab3f4 100644
--- a/src/components/CallView/CallView.vue
+++ b/src/components/CallView/CallView.vue
@@ -35,7 +35,7 @@
:show-actions="!isSidebar"
:local-call-participant-model="localCallParticipantModel"
:screen-sharing-button-hidden="isSidebar"
- @switch-screen-to-id="$emit('switchScreenToId', $event)" />
+ @switch-screen-to-id="_switchScreenToId" />
<!-- Selected override mode -->
<div v-if="showSelected"
@@ -53,7 +53,7 @@
:is-grid="true"
:is-big="true"
:fit-video="true"
- @switchScreenToId="_switchScreenToId" />
+ @switch-screen-to-id="_switchScreenToId" />
</template>
</div>
<!-- Screens -->
@@ -96,7 +96,7 @@
:video-container-aspect-ratio="videoContainerAspectRatio"
:local-call-participant-model="localCallParticipantModel"
:is-sidebar="false"
- @switchScreenToId="1" />
+ @switch-screen-to-id="_switchScreenToId" />
</div>
<!-- Promoted "autopilot" mode -->
<div v-else
@@ -115,7 +115,7 @@
:fit-video="true"
:is-big="true"
:is-sidebar="isSidebar"
- @switchScreenToId="_switchScreenToId" />
+ @switch-screen-to-id="_switchScreenToId" />
</template>
</div>
</template>
@@ -135,6 +135,7 @@
:local-call-participant-model="localCallParticipantModel"
:shared-datas="sharedDatas"
@select-video="handleSelectVideo"
+ @switch-screen-to-id="_switchScreenToId"
@click-local-video="handleClickLocalVideo" />
<!-- Local video if sidebar -->
<LocalVideo
@@ -150,7 +151,7 @@
:video-container-aspect-ratio="videoContainerAspectRatio"
:local-call-participant-model="localCallParticipantModel"
:is-sidebar="isSidebar"
- @switchScreenToId="1"
+ @switch-screen-to-id="_switchScreenToId"
@click-video="handleClickLocalVideo" />
</div>
</div>
@@ -360,7 +361,7 @@ export default {
// Everytime a new screen is shared, switch to promoted view
if (newValue.length > previousValue.length) {
this.$store.dispatch('startPresentation')
- } else if (newValue.length === 0 && previousValue.length > 0) {
+ } else if (newValue.length === 0 && previousValue.length > 0 && !this.hasLocalScreen) {
// last screen share stopped, reopening stripe
this.$store.dispatch('stopPresentation')
}
@@ -369,7 +370,7 @@ export default {
// Everytime the local screen is shared, switch to promoted view
if (showLocalScreen) {
this.$store.dispatch('startPresentation')
- } else {
+ } else if (this.callParticipantModelsWithScreen.length === 0) {
this.$store.dispatch('stopPresentation')
}
},
@@ -560,6 +561,8 @@ export default {
return
}
+ this.$store.dispatch('startPresentation')
+ this.$store.dispatch('selectedVideoPeerId', null)
this.screens.splice(index, 1)
this.screens.unshift(id)
},
diff --git a/src/components/CallView/Grid/Grid.vue b/src/components/CallView/Grid/Grid.vue
index 7bd15f3a4..38a03de9a 100644
--- a/src/components/CallView/Grid/Grid.vue
+++ b/src/components/CallView/Grid/Grid.vue
@@ -116,7 +116,7 @@
:local-media-model="localMediaModel"
:video-container-aspect-ratio="videoContainerAspectRatio"
:local-call-participant-model="localCallParticipantModel"
- @switchScreenToId="1"
+ @switch-screen-to-id="switchScreenToId"
@click-video="handleClickLocalVideo" />
</div>
<button v-if="hasNextPage && gridWidth > 0 && showVideoOverlay"
@@ -140,7 +140,7 @@
:local-media-model="localMediaModel"
:video-container-aspect-ratio="videoContainerAspectRatio"
:local-call-participant-model="localCallParticipantModel"
- @switchScreenToId="1"
+ @switch-screen-to-id="switchScreenToId"
@click-video="handleClickLocalVideo" />
<!-- page indicator (disabled) -->
<div
@@ -774,6 +774,10 @@ export default {
this.$emit('click-local-video')
},
+ switchScreenToId(id) {
+ this.$emit('switch-screen-to-id', id)
+ },
+
isSelected(callParticipantModel) {
return callParticipantModel.attributes.peerId === this.$store.getters.selectedVideoPeerId
},
diff --git a/src/components/CallView/shared/LocalMediaControls.vue b/src/components/CallView/shared/LocalMediaControls.vue
index b02132569..0233d8775 100644
--- a/src/components/CallView/shared/LocalMediaControls.vue
+++ b/src/components/CallView/shared/LocalMediaControls.vue
@@ -688,7 +688,7 @@ export default {
showScreen() {
if (this.model.attributes.localScreen) {
- this.$emit('switchScreenToId', this.localCallParticipantModel.attributes.peerId)
+ this.$emit('switch-screen-to-id', this.localCallParticipantModel.attributes.peerId)
}
this.screenSharingMenuOpen = false
diff --git a/src/components/CallView/shared/LocalVideo.vue b/src/components/CallView/shared/LocalVideo.vue
index aa6d40402..411284454 100644
--- a/src/components/CallView/shared/LocalVideo.vue
+++ b/src/components/CallView/shared/LocalVideo.vue
@@ -62,7 +62,7 @@
:model="localMediaModel"
:local-call-participant-model="localCallParticipantModel"
:screen-sharing-button-hidden="isSidebar"
- @switch-screen-to-id="$emit('switchScreenToId', $event)" />
+ @switch-screen-to-id="switchScreenToId($event)" />
</transition>
<div v-if="mouseover && isSelectable" class="hover-shadow" />
<div class="bottom-bar">
@@ -314,6 +314,10 @@ export default {
this.$store.dispatch('selectedVideoPeerId', null)
this.$store.dispatch('stopPresentation')
},
+
+ switchScreenToId(id) {
+ this.$emit('switch-screen-to-id', id)
+ },
},
}
diff --git a/src/components/CallView/shared/VideoBottomBar.vue b/src/components/CallView/shared/VideoBottomBar.vue
index 1cbae223e..1cf6ea6ba 100644
--- a/src/components/CallView/shared/VideoBottomBar.vue
+++ b/src/components/CallView/shared/VideoBottomBar.vue
@@ -270,7 +270,7 @@ export default {
switchToScreen() {
if (!this.sharedData.screenVisible) {
- this.$emit('switchScreenToId', this.model.attributes.peerId)
+ this.$emit('switch-screen-to-id', this.model.attributes.peerId)
}
},