VueTube/NUXT/components/Player/sponsorblock.vue

89 lines
1.5 KiB
Vue
Raw Normal View History

2022-06-01 03:40:36 +00:00
<template>
<div>
2022-06-01 18:35:14 +00:00
<v-progress-linear
v-for="block in blocks"
:key="block.UUID"
:buffer-value="(block.segment[1] / video.duration) * 100"
:value="(block.segment[0] / video.duration) * 100"
style="
2022-06-07 17:16:26 +00:00
z-index: 3;
position: absolute;
2022-06-01 18:35:14 +00:00
pointer-events: none;
2022-06-07 17:16:26 +00:00
background: transparent;
transform: translateY(50%);
2022-06-01 18:35:14 +00:00
"
2022-06-01 19:02:02 +00:00
:class="!fullscreen || controls ? '' : 'invisible'"
2022-06-01 18:35:14 +00:00
background-color="white"
background-opacity="1"
color="transparent"
2022-06-07 17:16:26 +00:00
:height="seeking ? 4 : 2"
:style="
fullscreen
2022-06-07 17:16:26 +00:00
? 'width: calc(100% - 2rem); left: 1rem; bottom: 3.25rem;'
: 'width: 100%; left: 0; bottom: 1px;'
"
2022-06-01 18:35:14 +00:00
/>
</div>
2022-06-01 03:40:36 +00:00
</template>
<script>
export default {
props: {
video: {
type: Object,
required: true,
},
2022-06-07 17:16:26 +00:00
seeking: {
type: Boolean,
required: true,
},
2022-06-01 04:00:54 +00:00
videoid: {
type: String,
required: true,
},
2022-06-01 18:35:14 +00:00
fullscreen: {
type: Boolean,
required: true,
},
2022-06-01 19:05:19 +00:00
controls: {
type: Boolean,
required: true,
},
2022-06-08 15:59:43 +00:00
blocks: {
type: Array,
required: true,
},
2022-06-01 03:40:36 +00:00
},
};
</script>
<style>
.sponsor {
color: green;
}
2022-06-01 18:35:14 +00:00
.selfpromo {
color: yellow;
}
.exclusive_access {
color: orange;
}
.interaction {
color: blue;
}
.intro {
color: purple;
}
.outro {
color: purple;
}
.music_offtopic {
color: red;
}
.poi_highlight {
color: #ff00ff;
}
.filler {
color: blue;
}
</style>