forked from MarseyWorld/MarseyWorld
show first frame of video
parent
17fd089870
commit
523bfd93c5
|
@ -319,8 +319,8 @@ def sanitize(sanitized, edit=False, limit_pings=0, showmore=True):
|
|||
|
||||
sanitized = sanitized.replace(i.group(0), htmlsource)
|
||||
|
||||
sanitized = video_sub_regex.sub(r'\1<video controls preload="none"><source src="\2"></video>', sanitized)
|
||||
sanitized = audio_sub_regex.sub(r'\1<audio controls preload="none" src="\2"></audio>', sanitized)
|
||||
sanitized = video_sub_regex.sub(r'\1<video controls preload="metadata"><source src="\2"></video>', sanitized)
|
||||
sanitized = audio_sub_regex.sub(r'\1<audio controls preload="metadata" src="\2"></audio>', sanitized)
|
||||
|
||||
if not edit:
|
||||
for marsey in g.db.query(Marsey).filter(Marsey.name.in_(marseys_used)).all():
|
||||
|
|
|
@ -79,7 +79,7 @@ Text 2
|
|||
<tr>
|
||||
<td>Video Files</td>
|
||||
<td>https://files.catbox.moe/v4om92.mp4</td>
|
||||
<td><video controls preload="none"><source referrerpolicy="no-referrer" src="https://files.catbox.moe/v4om92.mp4"></video></td>
|
||||
<td><video controls preload="metadata"><source referrerpolicy="no-referrer" src="https://files.catbox.moe/v4om92.mp4"></video></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Emojis</td>
|
||||
|
|
|
@ -765,7 +765,7 @@
|
|||
{% elif p.is_video %}
|
||||
<div class="row no-gutters">
|
||||
<div class="col">
|
||||
<video controls preload="none">
|
||||
<video controls preload="metadata">
|
||||
<source src="{{p.realurl(v)}}">
|
||||
</video>
|
||||
</div>
|
||||
|
@ -774,7 +774,7 @@
|
|||
{% elif p.is_audio %}
|
||||
<div class="row no-gutters">
|
||||
<div class="col">
|
||||
<audio controls preload="none" src="{{p.realurl(v)}}"></audio>
|
||||
<audio controls preload="metadata" src="{{p.realurl(v)}}"></audio>
|
||||
</div>
|
||||
</div>
|
||||
<pre></pre>
|
||||
|
|
|
@ -372,13 +372,13 @@
|
|||
</div>
|
||||
{% elif p.is_video %}
|
||||
<div id="video-{{p.id}}" style="text-align: center" class="{% if p.over_18 or not ((v and v.cardview) or (not v and CARD_VIEW)) %}d-none{% endif %} mt-4">
|
||||
<video id="video2-{{p.id}}" controls preload="none">
|
||||
<video id="video2-{{p.id}}" controls preload="metadata">
|
||||
<source src="{{p.realurl(v)}}">
|
||||
</video>
|
||||
</div>
|
||||
{% elif p.is_audio %}
|
||||
<div id="video-{{p.id}}" style="text-align: center" class="{% if p.over_18 or not ((v and v.cardview) or (not v and CARD_VIEW)) %}d-none{% endif %} mt-4">
|
||||
<audio id="video2-{{p.id}}" controls preload="none" src="{{p.realurl(v)}}"></audio>
|
||||
<audio id="video2-{{p.id}}" controls preload="metadata" src="{{p.realurl(v)}}"></audio>
|
||||
</div>
|
||||
{% elif p.is_youtube %}
|
||||
<div id="video-{{p.id}}" class="{% if p.over_18 or not ((v and v.cardview) or (not v and CARD_VIEW)) %}d-none{% endif %} mt-3 mb-4 youtube_embed">
|
||||
|
|
Loading…
Reference in New Issue