2022-02-24 22:29:34 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2022-03-14 00:41:03 +00:00
|
|
|
<video controls autoplay :src="vidSrc" width="100%" height="300vh" />
|
2022-03-20 00:27:45 +00:00
|
|
|
<v-card class="ml-2 mr-2 flat light" flat>
|
2022-03-20 16:55:25 +00:00
|
|
|
<v-card-title style="padding-top: 0; padding-bottom: 0; font-size: 0.95em;" v-text="title" />
|
2022-03-20 00:27:45 +00:00
|
|
|
<v-card-text>
|
2022-03-20 16:55:25 +00:00
|
|
|
<div style="margin-bottom: 1em;">{{ views }} views • {{uploaded}}</div>
|
2022-03-20 00:27:45 +00:00
|
|
|
|
|
|
|
<!-- Scrolling Div For Interactions --->
|
2022-03-20 16:55:25 +00:00
|
|
|
<div style="display: flex; margin-bottom: 1em;">
|
2022-03-20 16:29:29 +00:00
|
|
|
<v-list-item v-for="(item, index) in interactions" :key="index" style="padding: 0; flex: 0 0 20%;">
|
2022-03-20 00:27:45 +00:00
|
|
|
|
2022-03-20 18:42:12 +00:00
|
|
|
|
2022-03-20 19:24:57 +00:00
|
|
|
<v-btn text @click="item.action" class="vertical-button" style="padding: 0; margin: 0;" elevation=0 :disabled="item.disabled">
|
2022-03-20 00:27:45 +00:00
|
|
|
<v-icon v-text="item.icon" />
|
|
|
|
<div v-text="item.value || item.name" />
|
2022-03-20 16:13:58 +00:00
|
|
|
</v-btn>
|
2022-03-20 00:27:45 +00:00
|
|
|
|
|
|
|
</v-list-item>
|
2022-03-20 13:17:26 +00:00
|
|
|
|
2022-03-20 18:42:12 +00:00
|
|
|
|
2022-03-20 16:29:29 +00:00
|
|
|
<v-spacer />
|
2022-03-20 18:42:12 +00:00
|
|
|
<v-btn text @click="showMore = !showMore">
|
|
|
|
<v-icon v-if="showMore">mdi-chevron-up</v-icon>
|
|
|
|
<v-icon v-else>mdi-chevron-down</v-icon>
|
|
|
|
</v-btn>
|
|
|
|
|
2022-03-20 00:27:45 +00:00
|
|
|
</div>
|
|
|
|
<!-- End Scrolling Div For Interactions --->
|
2022-03-20 16:55:25 +00:00
|
|
|
<hr>
|
|
|
|
<p>Channel Stuff</p>
|
|
|
|
<hr>
|
|
|
|
|
2022-03-20 00:27:45 +00:00
|
|
|
|
|
|
|
</v-card-text>
|
2022-03-20 18:42:12 +00:00
|
|
|
<div class="scroll-y ml-2 mr-2" v-if="showMore">
|
|
|
|
{{ description }}
|
|
|
|
</div>
|
2022-03-20 13:17:26 +00:00
|
|
|
|
2022-03-20 18:42:12 +00:00
|
|
|
<!--<v-bottom-sheet v-model="showMore" color="accent2" style="z-index: 9999999;">
|
2022-03-20 13:32:28 +00:00
|
|
|
<v-sheet style="padding: 1em;">
|
2022-03-20 13:17:26 +00:00
|
|
|
|
2022-03-20 13:32:28 +00:00
|
|
|
<v-btn block @click="showMore = !showMore"><v-icon>mdi-chevron-down</v-icon></v-btn><br>
|
|
|
|
|
|
|
|
<div class="scroll-y">
|
|
|
|
{{ description }}
|
|
|
|
</div>
|
2022-03-20 13:17:26 +00:00
|
|
|
|
2022-03-20 18:42:12 +00:00
|
|
|
</v-sheet>
|
|
|
|
</v-bottom-sheet>-->
|
|
|
|
<v-bottom-sheet v-model="share" color="accent2" style="z-index: 9999999;">
|
|
|
|
<v-sheet style="padding: 1em;">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="scroll-y">
|
|
|
|
{{ description }}
|
|
|
|
</div>
|
|
|
|
|
2022-03-20 13:17:26 +00:00
|
|
|
</v-sheet>
|
|
|
|
</v-bottom-sheet>
|
2022-03-19 06:18:07 +00:00
|
|
|
</v-card>
|
2022-03-20 00:27:45 +00:00
|
|
|
|
|
|
|
<recommended />
|
|
|
|
|
2022-02-24 22:29:34 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-03-20 00:27:45 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.vertical-button span.v-btn__content {
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-around;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2022-02-24 22:29:34 +00:00
|
|
|
<script>
|
2022-03-20 00:27:45 +00:00
|
|
|
import recommended from '../components/recommended.vue';
|
2022-02-24 22:29:34 +00:00
|
|
|
export default {
|
2022-03-20 00:27:45 +00:00
|
|
|
components: { recommended },
|
2022-03-20 18:42:12 +00:00
|
|
|
methods: {
|
|
|
|
dislike() {
|
|
|
|
},
|
|
|
|
share() {
|
|
|
|
this.share = !this.share;
|
|
|
|
}
|
|
|
|
},
|
2022-02-24 22:29:34 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2022-03-20 00:27:45 +00:00
|
|
|
|
|
|
|
interactions: [
|
|
|
|
{ name: "Likes", icon: "mdi-thumb-up", action: null, value: this.likes, disabled: true },
|
2022-03-20 18:42:12 +00:00
|
|
|
{ name: "Dislikes", icon: "mdi-thumb-down", action: this.dislike(), value: this.dislikes, disabled: true },
|
|
|
|
{ name: "Share", icon: "mdi-share", action: this.share(), disabled: true },
|
2022-03-20 00:27:45 +00:00
|
|
|
],
|
2022-03-20 13:17:26 +00:00
|
|
|
showMore: false,
|
2022-03-20 18:42:12 +00:00
|
|
|
share: false,
|
2022-03-20 00:27:45 +00:00
|
|
|
title: null,
|
|
|
|
uploaded: null,
|
|
|
|
vidSrc: null,
|
|
|
|
description: null,
|
|
|
|
views: null,
|
2022-02-24 22:29:34 +00:00
|
|
|
}
|
2022-03-13 23:21:41 +00:00
|
|
|
},
|
|
|
|
mounted() {
|
2022-03-19 19:49:28 +00:00
|
|
|
|
2022-03-19 06:18:07 +00:00
|
|
|
this.$youtube.getVid(this.$route.query.v).then(result => {
|
2022-03-19 19:39:07 +00:00
|
|
|
console.log('Video info data', result)
|
2022-03-19 06:18:07 +00:00
|
|
|
result = result.data;
|
|
|
|
console.log(result.streamingData.formats)
|
|
|
|
this.vidSrc = result.streamingData.formats[result.streamingData.formats.length-1].url
|
|
|
|
this.title = result.videoDetails.title
|
|
|
|
this.description = result.videoDetails.shortDescription;
|
2022-03-20 16:57:16 +00:00
|
|
|
this.views = result.videoDetails.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
2022-03-19 06:18:07 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
this.$youtube.getRemainingVideoInfo(this.$route.query.v, (data) => {
|
|
|
|
this.uploaded = data.uploadDate;
|
2022-03-20 16:57:16 +00:00
|
|
|
this.interactions[0].value = data.likes.toString();
|
2022-03-19 06:18:07 +00:00
|
|
|
});
|
|
|
|
|
2022-03-20 18:42:12 +00:00
|
|
|
this.$ryd.getDislikes(this.$route.query.v, (data) => {
|
|
|
|
console.log('real data')
|
|
|
|
console.log(data)
|
2022-03-20 16:57:16 +00:00
|
|
|
this.interactions[1].value = data.dislikes.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
2022-03-19 06:18:07 +00:00
|
|
|
});
|
|
|
|
|
2022-02-24 22:29:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|