mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 18:11:23 +01:00
Support for video embeds like discord
This commit is contained in:
parent
4f2266c2b9
commit
764f8bb796
@ -1110,6 +1110,11 @@
|
||||
// if ($.inArray(disembed.type, ["rich", "link", "video"]) == -1) {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
disembed.isVideo = false;
|
||||
if (disembed.type == "video") {
|
||||
disembed.isVideo = true;
|
||||
}
|
||||
disembed.toRenderFooter = false;
|
||||
if (disembed.footer) {
|
||||
disembed.toRenderFooter = true;
|
||||
|
@ -401,9 +401,14 @@
|
||||
" target="_blank">{{title}}</a>
|
||||
</div>
|
||||
{{/title}}
|
||||
{{^isVideo}}
|
||||
{{#description}}
|
||||
<div class="description">{{description}}</div>
|
||||
{{/description}}
|
||||
{{/isVideo}}
|
||||
{{#isVideo}}
|
||||
<iframe class="video" src="{{video.url}}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
||||
{{/isVideo}}
|
||||
{{#fields.length}}
|
||||
<div class="fields">
|
||||
{{#fields}}
|
||||
@ -415,11 +420,11 @@
|
||||
</div>
|
||||
{{/fields.length}}
|
||||
</div>
|
||||
{{#thumbnail}}
|
||||
{{#thumbnail}}{{^isVideo}}
|
||||
<div class="thumbnail">
|
||||
<img src="{{thumbnail.proxy_url}}" class="materialboxed">
|
||||
</div>
|
||||
{{/thumbnail}}
|
||||
{{/isVideo}}{{/thumbnail}}
|
||||
</div>
|
||||
{{#image}}
|
||||
<div class="image">
|
||||
|
Loading…
Reference in New Issue
Block a user