Skip to content

Commit

Permalink
Fix video carousel in new galleries [WEB-1819]
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiltri committed Sep 3, 2020
1 parent da7ebbf commit d1a3087
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/views/components/molecules/_m-media.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
$type = $type === 'artist' ? 'image' : $type;
// WEB-912: For Gallery Items; image module is an array, but gallery item is object?
if (!is_array($item) && !empty($item->present()->input('videoUrl')))
if (isset($item['videoUrl']) || (!is_array($item) && !empty($item->present()->input('videoUrl'))))
{
$type = 'embed';
$poster = $media;
$media['embed'] = \App\Facades\EmbedConverterFacade::convertUrl($item->present()->input('videoUrl'));
$media['embed'] = \App\Facades\EmbedConverterFacade::convertUrl($item['videoUrl'] ?? $item->present()->input('videoUrl'));
}
if ($type === 'embed' and strrpos($media['embed'],'api.soundcloud.com')) {
Expand Down
1 change: 1 addition & 0 deletions resources/views/site/blocks/gallery_new.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'media' => $item->imageAsArray('image', 'desktop'),
'captionTitle' => getTitleWithFigureNumber($title),
'caption' => getSubtitleWithFigureNumber($subtitle, $title),
'videoUrl' => $item->input('videoUrl'),
];
break;
Expand Down

0 comments on commit d1a3087

Please sign in to comment.