@meduza/ui-kit-2 1.0.9 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui-kit-2.cjs.development.js +3 -12
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +3 -12
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/EmbedBlock/EmbedBlock.tsx +2 -14
package/package.json
CHANGED
|
@@ -13,19 +13,6 @@ import { EmbedBlockProps } from './EmbedBlock.types'
|
|
|
13
13
|
|
|
14
14
|
import styles from './EmbedBlock.module.css'
|
|
15
15
|
|
|
16
|
-
const thumbnailToImagePath = (url: string | undefined): string | undefined => {
|
|
17
|
-
if (!url) {
|
|
18
|
-
return undefined
|
|
19
|
-
}
|
|
20
|
-
const indexImage = url.indexOf('/image')
|
|
21
|
-
|
|
22
|
-
if (indexImage >= 0) {
|
|
23
|
-
return url.slice(indexImage)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return url
|
|
27
|
-
}
|
|
28
|
-
|
|
29
16
|
export const EmbedBlock: React.FC<EmbedBlockProps> = ({
|
|
30
17
|
block,
|
|
31
18
|
block: {
|
|
@@ -126,9 +113,10 @@ export const EmbedBlock: React.FC<EmbedBlockProps> = ({
|
|
|
126
113
|
>
|
|
127
114
|
<video
|
|
128
115
|
src={videoFileUrl}
|
|
129
|
-
poster={
|
|
116
|
+
poster={thumbnailUrl}
|
|
130
117
|
controls
|
|
131
118
|
playsInline
|
|
119
|
+
preload="none"
|
|
132
120
|
/>
|
|
133
121
|
</div>
|
|
134
122
|
</div>
|