forked from rc/aircox
update
This commit is contained in:
51
aircox/templates/aircox/widgets/player.html
Normal file
51
aircox/templates/aircox/widgets/player.html
Normal file
@ -0,0 +1,51 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% if audio_streams %}
|
||||
<br>
|
||||
|
||||
<div class="box is-fullwidth is-fixed-bottom is-paddingless player"
|
||||
role="{% trans "player" %}"
|
||||
aria-description="{% trans "audio player used to listen to the radio" %}">
|
||||
<noscript>
|
||||
<audio src="{{ audio_streams.0 }}" controls>
|
||||
{% for stream in audio_streams %}
|
||||
<source src="{{ stream }}" />
|
||||
{% endfor %}
|
||||
</audio>
|
||||
{# TODO: live infos #}
|
||||
</noscript>
|
||||
|
||||
<a-player ref="player" src="{{ audio_streams.0 }}"
|
||||
live-info-url="{% url "api:live" %}" :live-info-timeout="20"
|
||||
button-title="{% trans "Play or pause audio" %}">
|
||||
<template v-slot:sources>
|
||||
{% for stream in audio_streams %}
|
||||
<source src="{{ stream }}" />
|
||||
{% endfor %}
|
||||
</template>
|
||||
|
||||
<template v-slot:track="{ onAir }">
|
||||
<h4 class="title is-4">
|
||||
<span class="has-text-info is-size-3">♬</span>
|
||||
<span>[[ onAir.title ]]</span>
|
||||
<span class="has-text-grey-dark has-text-weight-light">
|
||||
— [[ onAir.artist ]]
|
||||
<i v-if="onAir.info">([[ onAir.info ]])</i>
|
||||
</span>
|
||||
</h4>
|
||||
</template>
|
||||
|
||||
<template v-slot:diffusion="{ onAir }">
|
||||
<h4 class="title is-4">
|
||||
<a :href="onAir.url">[[ onAir.title ]]</a>
|
||||
</h4>
|
||||
<div class="">[[ onAir.info ]]</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:empty>
|
||||
<h4 class="title is-4">{{ station.name }}</h4>
|
||||
</template>
|
||||
</a-player>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user