hi, i have small problem, i want to embed youtube ...
# kobweb
l
hi, i have small problem, i want to embed youtube video in page, i found iframe() element but cannot understand how to use it
image.png
c
Personally, I used one like so
Copy code
Iframe(
    attrs = Modifier
        .borderRadius(8.px)
        .overflow(Overflow.Hidden)
        .aspectRatio(16, 9)
        .width(if (breakpoint > Breakpoint.LG) 66.percent else 100.percent)
        .toAttrs {
            attr("allowfullscreen", "")
            attr(Attr.Src, project.embeddedVideoUrl)
        }
)
👍 2
d
Nice yeah something like that looks good
l
thanks, it worked 👍
👍 1