|
|
@ -434,20 +434,29 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Generic image embed
|
|
|
|
// Generic image embed
|
|
|
|
else if (embed.Kind == EmbedKind.Image && !string.IsNullOrWhiteSpace(embed.Image?.Url))
|
|
|
|
else if (embed.Kind == EmbedKind.Image && !string.IsNullOrWhiteSpace(embed.Url))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var embedImageUrl =
|
|
|
|
|
|
|
|
embed.Image?.ProxyUrl ?? embed.Image?.Url ??
|
|
|
|
|
|
|
|
embed.Thumbnail?.ProxyUrl ?? embed.Thumbnail?.Url ??
|
|
|
|
|
|
|
|
embed.Url;
|
|
|
|
|
|
|
|
|
|
|
|
<div class="chatlog__embed">
|
|
|
|
<div class="chatlog__embed">
|
|
|
|
<a href="@await ResolveAssetUrlAsync(embed.Image.ProxyUrl ?? embed.Image.Url)">
|
|
|
|
<a href="@await ResolveAssetUrlAsync(embedImageUrl)">
|
|
|
|
<img class="chatlog__embed-generic-image" src="@await ResolveAssetUrlAsync(embed.Image.ProxyUrl ?? embed.Image.Url)" alt="Embedded image" loading="lazy">
|
|
|
|
<img class="chatlog__embed-generic-image" src="@await ResolveAssetUrlAsync(embedImageUrl)" alt="Embedded image" loading="lazy">
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Generic gifv embed
|
|
|
|
// Generic gifv embed
|
|
|
|
else if (embed.Kind == EmbedKind.Gifv && !string.IsNullOrWhiteSpace(embed.Video?.Url))
|
|
|
|
else if (embed.Kind == EmbedKind.Gifv && !string.IsNullOrWhiteSpace(embed.Url))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var embedVideoUrl =
|
|
|
|
|
|
|
|
embed.Video?.ProxyUrl ?? embed.Video?.Url ??
|
|
|
|
|
|
|
|
embed.Url;
|
|
|
|
|
|
|
|
|
|
|
|
<div class="chatlog__embed">
|
|
|
|
<div class="chatlog__embed">
|
|
|
|
<video class="chatlog__embed-generic-gifv" loop width="@embed.Video.Width" height="@embed.Video.Height" onmouseover="this.play()" onmouseout="this.pause()">
|
|
|
|
<video class="chatlog__embed-generic-gifv" loop width="@embed.Video?.Width" height="@embed.Video?.Height" onmouseover="this.play()" onmouseout="this.pause()">
|
|
|
|
<source src="@await ResolveAssetUrlAsync(embed.Video.ProxyUrl ?? embed.Video.Url)" alt="Embedded video">
|
|
|
|
<source src="@await ResolveAssetUrlAsync(embedVideoUrl)" alt="Embedded video">
|
|
|
|
</video>
|
|
|
|
</video>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|
|
|
|