change video tags

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-20 22:26:39 +02:00
parent 2d41118f39
commit 3c3950adb0
4 changed files with 7 additions and 9 deletions

View File

@ -337,7 +337,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=True, count_marseys
sanitized = sanitized.replace(i.group(0), htmlsource)
sanitized = video_sub_regex.sub(r'\1<video controls preload="none"><source src="\2"></video>', sanitized)
sanitized = video_sub_regex.sub(r'\1<video controls preload="none" src="\2"></video>', sanitized)
sanitized = audio_sub_regex.sub(r'\1<audio controls preload="none" src="\2"></audio>', sanitized)
if count_marseys:

View File

@ -79,7 +79,9 @@ Text 2
<tr>
<td>Video Files</td>
<td>https://files.catbox.moe/v4om92.mp4</td>
<td><video controls preload="metadata"><source referrerpolicy="no-referrer" src="https://files.catbox.moe/v4om92.mp4"></video></td>
<td>
<video controls preload="none" src="https://files.catbox.moe/v4om92.mp4"></video>
</td>
</tr>
<tr>
<td>Emojis</td>

View File

@ -762,16 +762,14 @@
{% elif p.is_video %}
<div class="row no-gutters">
<div class="col">
<video controls preload="metadata">
<source src="{{p.realurl(v)}}">
</video>
<video controls preload="none" src="{{p.realurl(v)}}"></video>
</div>
</div>
<pre></pre>
{% elif p.is_audio %}
<div class="row no-gutters">
<div class="col">
<audio controls preload="metadata" src="{{p.realurl(v)}}"></audio>
<audio controls preload="none" src="{{p.realurl(v)}}"></audio>
</div>
</div>
<pre></pre>

View File

@ -330,9 +330,7 @@
</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">
<source src="{{p.realurl(v)}}">
</video>
<video id="video2-{{p.id}}" controls preload="none" 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">