don't use embed video on community page

This commit is contained in:
ChunkyProgrammer 2025-01-26 22:35:34 -05:00
parent 409d12a81e
commit 9b6c28f0fe

View File

@ -101,11 +101,67 @@ module Invidious::Frontend::Comments
</div>
END_HTML
else
html << <<-END_HTML
<div class="pure-g video-iframe-wrapper">
<iframe class="video-iframe" src='/embed/#{attachment["videoId"]?}?autoplay=0'></iframe>
</div>
END_HTML
if !thin_mode
html << <<-END_HTML
<a href="/watch?v=#{attachment["videoId"]}">
<div class="thumbnail">
<img loading="lazy" class="thumbnail" src="/vi/#{attachment["videoId"]}/mqdefault.jpg" alt="" />
<div class="bottom-right-overlay">
<p class="length">#{recode_length_seconds(attachment["lengthSeconds"].as_i)}</p>
</div>
</div>
<div class="video-card-row">
<p style="width:100%">#{attachment["title"]}</p>
</div>
</a>
END_HTML
else
html << <<-END_HTML
<a href="/watch?v=#{attachment["videoId"]}">
<div class="thumbnail">
<div class="thumbnail-placeholder"></div>
<div class="bottom-right-overlay">
<p class="length">#{recode_length_seconds(attachment["lengthSeconds"].as_i)}</p>
</div>
</div>
<div class="video-card-row">
<p style="width:100%">#{attachment["title"]}</p>
</div>
</a>
END_HTML
end
if !attachment["authorId"].as_s.empty?
if !attachment["authorVerified"].as_bool
html << <<-END_HTML
<a href="/channel/#{attachment["authorId"]}">
<div class="video-card-row flexible">
<p class="channel-name">
<b style="width:100%">#{attachment["author"]}</b>
</p>
</div>
</a>
END_HTML
else
html << <<-END_HTML
<a href="/channel/#{attachment["authorId"]}">
<div class="video-card-row flexible">
<p class="channel-name">
<b style="width:100%">#{attachment["author"]}</b>&nbsp;<i class="icon ion ion-md-checkmark-circle"></i>
</p>
</div>
</a>
END_HTML
end
else
html << <<-END_HTML
<div class="video-card-row flexible">
<p class="channel-name">
<b style="width:100%">#{attachment["author"]}</b>
</p>
</div>
END_HTML
end
end
when "multiImage"
html << <<-END_HTML