Significant video player improvements

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2022-11-26 05:12:02 +01:00
parent 1372697026
commit 58d126287e
5 changed files with 507 additions and 51 deletions
+25 -2
View File
@@ -1,4 +1,21 @@
{% capture content %}
{% if include.player %}
<div class="top">
<select class="variant"></select>
</div>
<div class="bottom">
<span class="play"></span>
<div class="playback">
<span class="time">0:00 / 0:00</span>
<input type="range" class="progress">
</div>
<div class="audio">
<span class="mute"></span>
<input type="range" class="volume">
</div>
<span class="fullscreen"></span>
</div>
{% endif %}
{% if include.link %}<a href="{% if include.link == true %}{{ include.url }}{% else %}{{ include.link }}{% endif %}" {% if include.caption %}alt="{{ include.caption }}"{% endif %} target="_blank">{% endif %}
{% assign file_info = site.static_files | where: "path", include.url %}
{% if include.type == "image" %}
@@ -18,7 +35,7 @@
{% if include.lazyload %}</noscript>{% endif %}
</picture>
{% elsif include.type == "video" %}
<video controls
<video {% if include.player %}{% else %}controls{% endif %}
class="content"
{% if include.lazyload %}data-lazyload=""{% endif %}
{% if include.poster %}poster="{{ include.poster | absolute_url }}"{% endif %}
@@ -59,4 +76,10 @@
{% if include.caption %}
<figcaption>{{ include.caption }}</figcaption>
{% endif %}
{% endcapture %}{% include blocks/_base.liquid type="media" content=content float=include.float align=include.align %}
{% endcapture %}
{% if include.player %}
{% assign class = include.type | append: " player" %}
{% else %}
{% assign class = include.type %}
{% endif %}
{% include blocks/_base.liquid type="media" class=class content=content float=include.float align=include.align id=include.id %}