nextcloud-app-radio/src/components/Player.vue

94 lines
1.6 KiB
Vue
Raw Normal View History

2020-10-17 18:06:57 +00:00
<template>
<div id="app-settings">
<button id="playbutton" class="play" :style="playerIcon" />
<div id="volumeicon" class="full" />
2020-10-21 08:43:37 +00:00
<input
class="volume"
type="range"
name="volume"
min="0"
max="50">
<span id="stationMetadata" />
2020-10-17 18:06:57 +00:00
</div>
</template>
<script>
export default {
data() {
return {
playerIcon: {
backgroundImage: `url( ${require('../../img/play.png')} )`,
},
}
},
}
</script>
<style>
2020-10-21 08:43:37 +00:00
#playbutton{
height:50px;
width: 50px;
margin: 10px;
border: none;
background-size: 100%;
background-position: center;
float: left;
transition: background-image 0.4s ease-in-out;
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
.buffering {
animation:spin 4s linear infinite;
/* background: url('../img/wheel.png') no-repeat; */
transition: background-image 0.4s ease-in-out;
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
@keyframes spin { 100% { transform:rotate(360deg); } }
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
#station_metadata{
margin: 2px 20px 5px 20px;
padding-left: 5px;
white-space:nowrap;
overflow:hidden;
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
.play{
/* background: url('../img/play.png') no-repeat; */
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
.pause{
/* background: url('../img/pause.png') no-repeat; */
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
#volumeicon {
width: 20px;
height: 20px;
background-size: contain;
background-repeat: no-repeat;
position: relative;
left: 75px;
top: 14px;
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
#volumeicon.full {
/* background-image: url('../img/sound_full.png'); */
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
#volumeicon.mid {
/* background-image: url('../img/sound_mid.png'); */
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
#volumeicon.silent {
/* background-image: url('../img/sound_silent.png'); */
}
2020-10-17 18:06:57 +00:00
2020-10-21 08:43:37 +00:00
.volume{
width: 170px;
display: inline-block;
position: relative;
left: 40px;
top: -7px;
}
2020-10-17 18:06:57 +00:00
</style>