Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing video play button size on magnifying and expand mode #1183

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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} />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we want to display size 12 for thumbnail

} 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if click action is NOTHING than why do we want to have the full video render? it's that means it's thumbnail?

) {
return true;
} else if (clickAction === GALLERY_CONSTS[optionsMap.behaviourParams.item.clickAction].LINK && !hasLink) {
return true;
Expand Down
Loading