mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +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) {
|
// if ($.inArray(disembed.type, ["rich", "link", "video"]) == -1) {
|
||||||
// continue;
|
// continue;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
disembed.isVideo = false;
|
||||||
|
if (disembed.type == "video") {
|
||||||
|
disembed.isVideo = true;
|
||||||
|
}
|
||||||
disembed.toRenderFooter = false;
|
disembed.toRenderFooter = false;
|
||||||
if (disembed.footer) {
|
if (disembed.footer) {
|
||||||
disembed.toRenderFooter = true;
|
disembed.toRenderFooter = true;
|
||||||
|
@ -401,9 +401,14 @@
|
|||||||
" target="_blank">{{title}}</a>
|
" target="_blank">{{title}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{/title}}
|
{{/title}}
|
||||||
|
{{^isVideo}}
|
||||||
{{#description}}
|
{{#description}}
|
||||||
<div class="description">{{description}}</div>
|
<div class="description">{{description}}</div>
|
||||||
{{/description}}
|
{{/description}}
|
||||||
|
{{/isVideo}}
|
||||||
|
{{#isVideo}}
|
||||||
|
<iframe class="video" src="{{video.url}}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
||||||
|
{{/isVideo}}
|
||||||
{{#fields.length}}
|
{{#fields.length}}
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
{{#fields}}
|
{{#fields}}
|
||||||
@ -415,11 +420,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/fields.length}}
|
{{/fields.length}}
|
||||||
</div>
|
</div>
|
||||||
{{#thumbnail}}
|
{{#thumbnail}}{{^isVideo}}
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<img src="{{thumbnail.proxy_url}}" class="materialboxed">
|
<img src="{{thumbnail.proxy_url}}" class="materialboxed">
|
||||||
</div>
|
</div>
|
||||||
{{/thumbnail}}
|
{{/isVideo}}{{/thumbnail}}
|
||||||
</div>
|
</div>
|
||||||
{{#image}}
|
{{#image}}
|
||||||
<div class="image">
|
<div class="image">
|
||||||
|
Loading…
Reference in New Issue
Block a user