Back to overview
Lights on
Lights off

2.2

Custom attribute x-mave-pop

In this lesson, I'm showing you how to optimize the video player we added in the previous lesson to make our pizza course homepage more inviting. I explain that we want the video to autoplay and allow viewers to click to see the full-length video.

I introduce two key features to achieve this: the clip component and the x-mave-pop feature. I start by demonstrating how to use the clip component, which is essentially the same as the player but limited to 60 seconds. This allows for autoplay without overwhelming the page.

Next, I guide you through changing the player to a clip in the HTML file. I point out that this simple change results in an autoplaying, fast-loading video that's capped at 60 seconds. To enable viewers to watch the full video, I introduce the x-mave-pop pop feature. I show you how to add a play button overlay to the clip and implement the x-mave-pop pop attribute.

This allows the full video to open in a pop-up window when clicked. I then address a potential issue: the theme we previously set isn't carrying over to the pop-up player. To fix this, I demonstrate how to define a custom x-mave-pop. I walk you through the documentation and show you how to implement this custom pop-up, which allows us to maintain our chosen theme (in this case, Dolphin) in the full-screen player.

Throughout the lesson, I'm emphasizing how these features can enhance user experience by providing a glimpse of the video content upfront, while still allowing easy access to the full content. I'm also showcasing mave's flexibility in customization, allowing you to maintain a consistent look and feel across different video display formats.

Mentor

David van Leeuwen

Developer

David van Leeuwen is a web developer with over 15 years of experience. Throughout his career, he has collaborated with multidisciplinary teams on projects for renowned companies such as Sonos, WeTransfer, and Red Bull.

David is currently leading the development of mave and will be the mentor if this course. He is enthusiastic about sharing his knowledge and helping you get started with video integration.

Don’t have a mave account?

Sign up today and get started for free with our 30-day trial.

The code for this lesson available on our Github

works with
Developer?
Our docs guide you through the process of embedding video, starting with simple steps for novices and advancing to manual configurations for experienced users. It outlines multiple hosting alternatives, including a default CDN, and highlights compatibility with popular web frameworks.
script
react
vue
1
2
3
4
5
🍪 Press 'Accept' to confirm that you accept we don't use cookies. Yes, this banner is just for show!
Accept