kobweb icon indicating copy to clipboard operation
kobweb copied to clipboard

Add example for using video tag in a Kobweb site

Open Micoder-dev opened this issue 2 years ago • 3 comments

Need a proper doc for Video Tag which is used in HTML that plays all types of videos, here we have a Video attr but don't know how to implement


  • [ ] README
  • [ ] Video Player
  • [ ] Website docs (https://www.w3schools.com/tags/tag_video.asp)

Micoder-dev avatar Oct 03 '23 05:10 Micoder-dev

Thank you for filing this doc bug. I agree video is useful and can be documented.

For now, you can see me using it in action here: https://github.com/varabyte/kobweb-site/blob/2be6aaf838232240ace56d13290a691ec2a5194c/src/jsMain/kotlin/com/varabyte/kobweb/site/components/sections/home/CliSection.kt#L43

This is basically a case where you'll use raw Compose HTML. Hope the helps!

bitspittle avatar Oct 03 '23 06:10 bitspittle

Thank you for filing this doc bug. I agree video is useful and can be documented.

For now, you can see me using it in action here: https://github.com/varabyte/kobweb-site/blob/2be6aaf838232240ace56d13290a691ec2a5194c/src/jsMain/kotlin/com/varabyte/kobweb/site/components/sections/home/CliSection.kt#L43

This is basically a case where you'll use raw Compose HTML. Hope the helps!

We can play local videos with this code, but what if we have online URLs like HLS

Micoder-dev avatar Oct 03 '23 07:10 Micoder-dev

I'm not sure exactly what you mean by the last part, but I'm pretty sure that solving and/or documenting that case is outside the scope of Kobweb.

Anytime I need to support a new feature, I search for how to do it in basic HTML / JS first. And from there it is usually straightforward to convert it to Kotlin.

bitspittle avatar Oct 04 '23 00:10 bitspittle