Skip to content

Commit

Permalink
[wip] feat(Screen): allow to zoom and pan screenshare content
Browse files Browse the repository at this point in the history
- library is 6kB, so nothing painful
- container must have a  size (itherwise it's 0 height and not visible
- with w+h 100% other styles are broken in Speaker view, didn't check Grid view yet

[skip ci]

Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Dec 19, 2024
1 parent 4eae849 commit 3330e9c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/CallView/shared/Screen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<script>
import Hex from 'crypto-js/enc-hex.js'
import SHA1 from 'crypto-js/sha1.js'
import panzoom from 'panzoom'

import { t } from '@nextcloud/l10n'

Expand Down Expand Up @@ -139,6 +140,10 @@ export default {
} else {
this._setScreen(this.callParticipantModel.attributes.screen)
}
// just grab a DOM element
const element = document.getElementById(this.screenContainerId)
// And pass it to panzoom
panzoom(element)
},

methods: {
Expand All @@ -165,6 +170,11 @@ export default {

<style lang="scss" scoped>

.screenContainer {
width: 100%;
height: 100%;
}

.screen {
width: 100%;
height: 100%;
Expand Down

0 comments on commit 3330e9c

Please sign in to comment.