Skip to main content
March 2, 2022
Solved

Video in Interface

  • March 2, 2022
  • 9 replies
  • 0 views

I tried adding a YouTube video to an interface but it ends up blank.

a!videoField(
              videos: {
                a!webVideo(
                  source: document(21953,"url")
                )
              }
            )

I tried using this code and for source I tried replacing it with the YouTube video url which didn't work also. Do I need the mp4 of the video in documents or are YouTube videos not compatible?

Best answer by curtisg

Thanks so much for this explanation -- Helped me a lot

9 replies

andrewh0007
March 2, 2022

I have looked at this in the past and I've been unable to link to YouTube videos. AFAIK this hasn't changed and for one particular use case I simply downloaded the video and uploaded it into my environment.

Would love to know if anyone knows how to embed a YouTube video though!

danny.verb
March 2, 2022

To embed a youtube video copy the HTML embedded tag Youtube will give you. Within that, there's a URL that has /embed. Place that in a web content field. There are also component plugins in the app market which are more Youtube friendly.

andrewh0007
March 2, 2022

Brilliant. I'll explore when I can