@meduza/ui-kit-2 1.0.8 → 1.0.9
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 +11 -1
- 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 +11 -1
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit-game.css +7278 -0
- package/dist/ui-kit.css +0 -5
- package/package.json +1 -1
- package/src/EmbedBlock/EmbedBlock.tsx +14 -1
package/dist/ui-kit-2.esm.js
CHANGED
|
@@ -1163,6 +1163,16 @@ const EmbedGif = ({
|
|
|
1163
1163
|
|
|
1164
1164
|
/* eslint-disable react/no-unknown-property */
|
|
1165
1165
|
/* eslint-disable jsx-a11y/media-has-caption */
|
|
1166
|
+
const thumbnailToImagePath = url => {
|
|
1167
|
+
if (!url) {
|
|
1168
|
+
return undefined;
|
|
1169
|
+
}
|
|
1170
|
+
const indexImage = url.indexOf('/image');
|
|
1171
|
+
if (indexImage >= 0) {
|
|
1172
|
+
return url.slice(indexImage);
|
|
1173
|
+
}
|
|
1174
|
+
return url;
|
|
1175
|
+
};
|
|
1166
1176
|
const EmbedBlock = ({
|
|
1167
1177
|
block,
|
|
1168
1178
|
block: {
|
|
@@ -1249,7 +1259,7 @@ const EmbedBlock = ({
|
|
|
1249
1259
|
className: makeClassName([[styles$r.objectWrap, true], [styles$r.isDefaultVideo, true]])
|
|
1250
1260
|
}, /*#__PURE__*/React.createElement("video", {
|
|
1251
1261
|
src: videoFileUrl,
|
|
1252
|
-
poster: thumbnailUrl
|
|
1262
|
+
poster: thumbnailToImagePath(thumbnailUrl),
|
|
1253
1263
|
controls: true,
|
|
1254
1264
|
playsInline: true
|
|
1255
1265
|
})));
|