File tree 1 file changed +10
-2
lines changed
resources/assets/js/components/presenter
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 22
22
:alt =" altText(status)" />
23
23
</div >
24
24
<div v-else class =" embed-responsive embed-responsive-16by9" >
25
- <video class =" video" controls playsinline preload =" metadata" loop :data-id =" status.id" >
25
+ <video class =" video" controls playsinline preload =" metadata" loop :data-id =" status.id" :poster = " poster() " >
26
26
<source :src =" status.media_attachments[0].url" :type =" status.media_attachments[0].mime" >
27
27
</video >
28
28
</div >
76
76
77
77
toggleContentWarning (status ) {
78
78
this .$emit (' togglecw' );
79
- }
79
+ },
80
+
81
+ poster () {
82
+ let url = this .status .media_attachments [0 ].preview_url ;
83
+ if (url .endsWith (' no-preview.jpg' ) || url .endsWith (' no-preview.png' )) {
84
+ return ;
85
+ }
86
+ return url;
87
+ }
80
88
}
81
89
}
82
90
</script >
You can’t perform that action at this time.
0 commit comments