Skip to content

Commit

Permalink
fixing video play button size on magnifying and expand mode (#1183)
Browse files Browse the repository at this point in the history
* fixing video play button size on magnifying and expand mode

* Show play button on all playTrigger's valid values

* fixing video play button on magnifying mode and resizing it
  • Loading branch information
Galpittel authored Feb 14, 2024
1 parent 00c310e commit 49faefc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/gallery/src/components/item/media/mediaItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type MediaImplementationProps<T = {}> = T &

const getPlayButtonComponentByItemType = (type: string) => {
if (type === 'video') {
return <GalleryUI type={'videoPlayButton'} size={12} />;
return <GalleryUI type={'videoPlayButton'} size={60} />;
} else if (type === '3d') {
return <GalleryUI type={'rotateArrow'} size={60} />;
} else {
Expand All @@ -71,13 +71,15 @@ export default function MediaItem<T extends Record<string, any>>(props: MediaPro
if (utils.isSSR()) {
return false;
}

if (
playTrigger === GALLERY_CONSTS[optionsMap.behaviourParams.item.video.playTrigger].HOVER ||
playTrigger === GALLERY_CONSTS[optionsMap.behaviourParams.item.video.playTrigger].AUTO
) {
return true;
} else if (clickAction === GALLERY_CONSTS[optionsMap.behaviourParams.item.clickAction].NOTHING) {
} else if (
clickAction === GALLERY_CONSTS[optionsMap.behaviourParams.item.clickAction].NOTHING ||
clickAction === GALLERY_CONSTS[optionsMap.behaviourParams.item.clickAction].MAGNIFY
) {
return true;
} else if (clickAction === GALLERY_CONSTS[optionsMap.behaviourParams.item.clickAction].LINK && !hasLink) {
return true;
Expand Down

0 comments on commit 49faefc

Please sign in to comment.