Skip to content

Commit

Permalink
Merge pull request #50 from palavatv/feature/set-ideal-gum-values
Browse files Browse the repository at this point in the history
Set "ideal" video resolution values
  • Loading branch information
farao authored Jun 2, 2020
2 parents ec0af49 + 85990fe commit 70af924
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/UserMediaConfigurator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<button
autofocus
:title="$t('room.gumChoiceVideoAndAudio')"
@click="$emit('join-room', { video: { facingMode: 'user' }, audio:true })"
@click="$emit('join-room', { video: videoConstraints, audio:true })"
>
<inline-svg
:alt="$t('party.cameraAlt')"
Expand All @@ -43,7 +43,7 @@
<li class="gum-choice gum-choice--video">
<button
:title="$t('room.gumChoiceVideo')"
@click="$emit('join-room', { video: { facingMode: 'user' }, audio:false })"
@click="$emit('join-room', { video: videoConstraints, audio:false })"
>
<inline-svg
:alt="$t('party.cameraAlt')"
Expand Down Expand Up @@ -80,6 +80,7 @@
<script>
import LanguageSwitcher from '@/components/LanguageSwitcher.vue'
import Logo from '@/components/Logo.vue'
import config from '@/config'
export default {
components: {
Expand All @@ -92,6 +93,11 @@ export default {
default: null,
},
},
computed: {
videoConstraints() {
return config.gumVideoConstraints
}
}
}
</script>

Expand Down
7 changes: 7 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ export default {
defaultRtcUrl: 'ws://localhost:4233',
defaultStunUrl: 'stun:stun.palava.tv',
defaultJoinTimeout: 1500,
gumVideoConstraints: {
// default to selfie camera for video calls
facingMode: 'user',
// "ideal" resolution requested, will scale down automatically
width: 1280,
height: 720,
},
reconnectTimeout: 1000,
maximumPeers: 6,
defaultLocale: 'en',
Expand Down

0 comments on commit 70af924

Please sign in to comment.