@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.
@@ -1167,6 +1167,16 @@ const EmbedGif = ({
1167
1167
 
1168
1168
  /* eslint-disable react/no-unknown-property */
1169
1169
  /* eslint-disable jsx-a11y/media-has-caption */
1170
+ const thumbnailToImagePath = url => {
1171
+ if (!url) {
1172
+ return undefined;
1173
+ }
1174
+ const indexImage = url.indexOf('/image');
1175
+ if (indexImage >= 0) {
1176
+ return url.slice(indexImage);
1177
+ }
1178
+ return url;
1179
+ };
1170
1180
  const EmbedBlock = ({
1171
1181
  block,
1172
1182
  block: {
@@ -1253,7 +1263,7 @@ const EmbedBlock = ({
1253
1263
  className: makeClassName([[styles$r.objectWrap, true], [styles$r.isDefaultVideo, true]])
1254
1264
  }, /*#__PURE__*/React.createElement("video", {
1255
1265
  src: videoFileUrl,
1256
- poster: thumbnailUrl || undefined,
1266
+ poster: thumbnailToImagePath(thumbnailUrl),
1257
1267
  controls: true,
1258
1268
  playsInline: true
1259
1269
  })));