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

Create a video player component #223

Merged
merged 9 commits into from
Jun 4, 2024
Merged

Create a video player component #223

merged 9 commits into from
Jun 4, 2024

Conversation

maxatdetroit
Copy link
Member

@maxatdetroit maxatdetroit commented Jun 3, 2024

Closes #220

This PR introduces a video player component for the design system. Key features:

  • Displays video thumbnail with play icon
    • Thumbnail supports inline (for future use cases) and full-width display modes (for legacy detroit site)
  • Supports modal player
    • When clicked, modal opens (50% of viewport width on desktop and 90% on smaller devices) and plays the video within the modal
    • On modal close, the video stops playing
    • Note: Player has a display attribute so we can support inline (i.e. play the video where the thumbnail is) in the future without the modal. It's not implemented currently.
  • Supports YouTube videos using the YouTube iFrame Player API
    • Note: video-type attribute is added so we can support other video types (vimeo, self-hosted) in the future and sensibly support backwards compatibility.

Testing

See storybook in chromatic and click around.

2024-06-03.13-26-56.mp4

@maxatdetroit maxatdetroit added the enhancement New feature or request label Jun 3, 2024
@maxatdetroit maxatdetroit requested a review from jedgar1mx June 3, 2024 16:24
@maxatdetroit maxatdetroit self-assigned this Jun 3, 2024
@maxatdetroit maxatdetroit marked this pull request as draft June 3, 2024 16:45
@maxatdetroit
Copy link
Member Author

Moving to draft while I add some attributes for future implementation and fix layout on smaller viewports.

@maxatdetroit maxatdetroit marked this pull request as ready for review June 3, 2024 17:18
@jedgar1mx
Copy link
Member

It looks like it's missing the back drop effect. It helps with focus but also for closing functionality.

image

@maxatdetroit
Copy link
Member Author

Fixed @jedgar1mx . Anything else you think we could improve?

Copy link
Member

@jedgar1mx jedgar1mx left a comment

Choose a reason for hiding this comment

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

This looks good. Well done.

@jedgar1mx jedgar1mx merged commit f703972 into dev Jun 4, 2024
5 checks passed
@jedgar1mx jedgar1mx deleted the issue.220-videoplayer branch June 4, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Video Player component
2 participants