Embed video from attachment

  • 1
  • Question
  • Updated 2 years ago
  • Answered
On a record page, has anyone ever embedded a video on a skuid page that was attached to a record?
Photo of Sean

Sean

  • 630 Points 500 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,040 Points 10k badge 2x thumb
Hi Sean,

In a template component, you can use iframes to embed video content, if the "allow HTML" option is checked. Depending on where these videos are being hosted, one option would be to create a text field on your object, and save the HTML for each record's iframe there.

For example, YouTube provides a way to grab embed code like this:

iframe width="560" height="315" src="https://www.youtube.com/embed/ILBytrnw3Ao" frameborder="0" allowfullscreen></iframe

You can paste that iframe code right into the template, or you can call it up by using merge syntax. Say the text field you've created is vid_iframe__c. In your template, you'd just include {{vid_iframe__c}}. If HTML is enabled for that template, Skuid will look in that field for each record in the template's model and fill it in. 
(Edited)
Photo of Sean

Sean

  • 630 Points 500 badge 2x thumb
Thanks Mark. That solution worked out well for me. The HTML field was a great idea.