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

Set "ideal" video resolution values #50

Merged
merged 1 commit into from
Jun 2, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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