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

51 lines
915 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.
-->
<div class="plyr">
<audio controls crossorigin="anonymous"></audio>
</div>
</template>
<script lang="ts" setup>
//
</script>
2022-10-13 15:18:47 +00:00
<style lang="scss">
// can't be scoped as it would be overridden by the plyr css
.plyr {
width: 100%;
height: 4px;
2022-10-22 07:29:51 +00:00
audio {
display: none;
}
2022-10-13 15:18:47 +00:00
.plyr__controls {
background: transparent;
box-shadow: none;
padding: 0 !important;
2022-10-22 07:29:51 +00:00
position: absolute;
top: 0;
width: 100%;
2022-10-13 15:18:47 +00:00
}
.plyr__progress--played[value] {
transition: .3s ease-in-out;
color: rgba(255, 255, 255, .1);
}
&:hover {
.plyr__progress--played[value] {
color: var(--color-highlight);
}
}
@media(hover: none) {
.plyr__progress--played[value] {
color: var(--color-highlight);
}
}
}
</style>