koel/resources/assets/js/components/layout/app-footer/AudioPlayer.vue

45 lines
984 B
Vue
Raw Normal View History

2022-10-13 15:18:47 +00:00
<template>
<!--
A very thin wrapper around Plyr, extracted as a standalone component for easier styling and to work better with HMR.
-->
2024-04-04 22:20:42 +00:00
<div class="plyr w-full h-[4px]">
<audio class="hidden" controls crossorigin="anonymous" />
2022-10-13 15:18:47 +00:00
</div>
</template>
2024-04-04 20:13:35 +00:00
<style lang="postcss">
/* can't be scoped as it would be overridden by the plyr css */
2022-10-13 15:18:47 +00:00
.plyr {
.plyr__controls {
2024-04-04 22:20:42 +00:00
@apply bg-transparent shadow-none absolute top-0 w-full;
@apply p-0 !important;
2022-10-13 15:18:47 +00:00
}
.plyr__progress--played[value] {
2024-04-04 22:20:42 +00:00
@apply transition duration-300 ease-in-out text-white/10;
2022-12-23 15:44:34 +00:00
:fullscreen & {
2024-04-04 22:20:42 +00:00
@apply text-white/50 rounded-full overflow-hidden;
2022-12-23 15:44:34 +00:00
}
2022-10-13 15:18:47 +00:00
}
&:hover {
.plyr__progress--played[value] {
2024-04-04 22:20:42 +00:00
@apply text-k-highlight;
2022-10-13 15:18:47 +00:00
}
}
2024-04-04 22:20:42 +00:00
.plyr__progress--played[value] {
@apply no-hover:text-k-highlight;
2022-10-13 15:18:47 +00:00
}
2022-12-23 15:44:34 +00:00
:fullscreen & {
2024-04-04 22:20:42 +00:00
@apply z-[4] bg-white/20 rounded-full;
2022-12-23 15:44:34 +00:00
.plyr__progress--played[value] {
2024-04-04 22:20:42 +00:00
@apply text-white !important;
2022-12-23 15:44:34 +00:00
}
}
2022-10-13 15:18:47 +00:00
}
</style>