h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 323 forks source link

Video component #2173

Open TomDarmon opened 8 months ago

TomDarmon commented 8 months ago

Is your feature request related to a problem? Please describe

I would like to be able to embedded videos natively in Wave. Currently the only work around I've found is with HTML:

def html_render_video(video_url: str, width: int, height: int):
    html = f"""
    <iframe src="{video_url}" 
    width="{width}" height="{height}" frameborder="0" allowfullscreen></iframe>
    """
    return html

card=ui.form_card(
            box=ui.box('video'),
            items=[
                ui.frame(
                    content=html_render_video(
                        video_url="https://www.youtube.com/embed/5qap5aO4i9A",
                        width='1600',
                        height='900',
                    ),
                ),
            ]
        )

It is not optimal as I lose a lot of the perfs of Wave when I used this kind of code :(

Describe the solution you'd like

A native wave component to embedded videos from a URL.

chandan00761 commented 8 months ago

Hi, I would like to work on this.