video quality selector beta

This commit is contained in:
Nikita Krupin 2022-05-29 14:42:39 -04:00
parent 05cf9a7292
commit 8bbbca2bef
2 changed files with 28 additions and 35 deletions

View File

@ -9,42 +9,41 @@
<v-btn <v-btn
fab fab
text text
disabled
style="position: absolute; bottom: 0.25rem; right: 4rem" style="position: absolute; bottom: 0.25rem; right: 4rem"
v-bind="attrs" v-bind="attrs"
v-on="on" v-on="on"
> >
HD {{ sources.find((src) => src.url == video.src).qualityLabel }}
</v-btn> </v-btn>
</template> </template>
<v-card class="background"> <v-card class="background">
<v-subheader>Playback Speed</v-subheader> <v-subheader>Playback Speed</v-subheader>
<v-card-text style="height: 50vh" class="ma-0 pa-0"> <v-card-text style="max-height: 50vh" class="pa-0">
<v-list> <v-list-item
<v-list-item v-for="src in sources"
v-for="src in sources" :key="src"
:key="src" @click="(sheet = false), (video.src = src.url)"
@click="(sheet = false), (video.src = src.url)" >
> <v-list-item-avatar>
<v-list-item-avatar> <v-icon
<v-icon :color="
:color=" video.src === src.url
video.src === src.url ? 'primary'
? 'primary' : $vuetify.theme.dark
: $vuetify.theme.dark ? 'background lighten-2'
? 'background lighten-2' : 'background darken-2'
: 'background darken-2' "
" v-text="
v-text=" video.src === src.url
video.src === src.url ? 'mdi-checkbox-outline'
? 'mdi-checkbox-outline' : 'mdi-checkbox-blank-outline'
: 'mdi-checkbox-blank-outline' "
" ></v-icon>
></v-icon> </v-list-item-avatar>
</v-list-item-avatar> <v-list-item-title>
<v-list-item-title>{{ sped }}X</v-list-item-title> {{ src.qualityLabel }} ({{ src.quality }})
</v-list-item> </v-list-item-title>
</v-list> </v-list-item>
</v-card-text> </v-card-text>
</v-card> </v-card>
</v-bottom-sheet> </v-bottom-sheet>
@ -57,11 +56,5 @@ export default {
data: () => ({ data: () => ({
sheet: false, sheet: false,
}), }),
mounted() {
console.log(
"sourcessourcessourcessourcessourcessourcessources",
this.sources
);
},
}; };
</script> </script>

View File

@ -52,7 +52,7 @@ export default {
props: ["video"], props: ["video"],
data: () => ({ data: () => ({
sheet: false, sheet: false,
speeds: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 3, 4, 5, 10], speeds: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 3, 4, 8, 16],
}), }),
}; };
</script> </script>