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

Better control bar #116

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
38 changes: 38 additions & 0 deletions components/Player/ControlBar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<div class="control-bar">
<div class="control-inner">
<div class="volume-controls">
<img v-if="!this.isStreamMuted" src="/icons/speaker-unmuted.svg" alt="" class="icon" @click="toggleStreamMute"/>
<img v-else src="/icons/speaker-muted.svg" alt="" class="icon" @click="toggleStreamMute"/>
<input
v-model="volumeValue"
class="volume-slider"
type="range"
min="0"
max="100"
value=100
step="1"
@input="volumeChanged"
/>
</div>
<img src="/icons/fullscreen.svg" alt="" class="fullscreen-toggle icon" @click="toggleFullscreen"/>
</div>
</div>
</template>

<script>
export default {
methods: {
toggleStreamMute() {
this.isStreamMuted = !this.isStreamMuted
this.$store.commit('setMutedStatus', this.isStreamMuted)
},
volumeChanged() {
this.$store.commit('setViewerVolume', this.volumeValue)
},
toggleFullscreen() {
this.$root.$emit('toggle-fullscreen')
}
}
}
</script>
29 changes: 0 additions & 29 deletions components/Player/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
<template>
<div class="player-footer">
<div class="control-bar">
<div class="volume-controls">
<img v-if="!this.isStreamMuted" src="/icons/speaker-unmuted.svg" alt="" class="icon" @click="toggleStreamMute"/>
<img v-else src="/icons/speaker-muted.svg" alt="" class="icon" @click="toggleStreamMute"/>
<input
v-model="volumeValue"
class="volume-slider"
type="range"
min="0"
max="100"
value=100
step="1"
@input="volumeChanged"
/>
</div>
<img src="/icons/fullscreen.svg" alt="" class="fullscreen-toggle icon" @click="toggleFullscreen"/>
</div>
<div class="user-icons">
<UserIcon
v-for="member in members"
Expand Down Expand Up @@ -69,18 +52,6 @@

return [...new Set(this.room.members.map(({ id }) => id))]
}
},
methods: {
toggleStreamMute() {
this.isStreamMuted = !this.isStreamMuted
this.$store.commit('setMutedStatus', this.isStreamMuted)
},
volumeChanged() {
this.$store.commit('setViewerVolume', this.volumeValue)
},
toggleFullscreen() {
this.$root.$emit('toggle-fullscreen')
}
}
}
</script>
7 changes: 5 additions & 2 deletions components/Player/Viewer.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="player" ref="viewport" :class="{ 'capture-events': hasControl }">
<div class="player" ref="viewport" :class="{ 'has-control capture-events': hasControl }">
<p v-if=showPlayerDevtools class="player-dev">
Portal ID: {{ portal.id }}
<br>
Expand Down Expand Up @@ -36,6 +36,7 @@
@mousewheel=didMouseWheel
@contextmenu=handleRightClick
/>
<ControlBar />
<div v-if=showMutedPopup class="player-tooltips">
<div class="player-tooltip" :class="{ visible: showMutedPopup }">
<div class="player-tooltip-info">
Expand All @@ -59,10 +60,12 @@
import brand from '~/brand/config'

import Button from '~/components/Button'
import ControlBar from '~/components/Player/ControlBar'

export default {
components: {
Button
Button,
ControlBar
},
props: {
volume: Number,
Expand Down
1 change: 0 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export default {
...script
]
},
loadingIndicator: '~/components/Loading/index.html',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you get to dislike that loading indicator?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put reasoning in the commit description

Screenshot 2020-05-30 at 01 49 07

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the page that's shown before the whole app loads, so it should be kept.

robots: {
// by default, this only allows the root to be indexed, not the rest, which is enough.
UserAgent: '*',
Expand Down