Add a feature flag for using the native HTML audio

...player element
This commit is contained in:
Oliver Davies 2024-12-16 12:00:00 +00:00
parent c8477d4a8a
commit b9f66b5b07
3 changed files with 21 additions and 11 deletions

View file

@ -311,6 +311,8 @@ transistor:
share: share:
url: https://share.transistor.fm/e url: https://share.transistor.fm/e
use_transistor: false
youtube: youtube:
channel: channel:
slug: opdavies slug: opdavies

View file

@ -3,3 +3,5 @@ imports:
- sculpin_site.yml - sculpin_site.yml
url: https://www.oliverdavies.uk url: https://www.oliverdavies.uk
use_transistor: true

View file

@ -19,6 +19,7 @@
{% endblock %} {% endblock %}
{% block content_wrapper %} {% block content_wrapper %}
{% if site.use_transistor %}
{% if page.transistor.id %} {% if page.transistor.id %}
<div> <div>
<iframe <iframe
@ -31,6 +32,11 @@
</iframe> </iframe>
</div> </div>
{% endif %} {% endif %}
{% else %}
<audio controls>
<source src="/files/bb/episodes/{{ page.episode_filename }}" type="audio/mp3">
</audio>
{% endif %}
{{ parent() }} {{ parent() }}