Connecting an iframe to database

#iframe #data_binding #embedding_video #dynamic_page
I need to embed a video in a dynamic page.
(I cant use the regular video player, as I would like to block the ‘related videos’ in the end
and this only works with an iframe embedding)
Apparently the iframe component does not connect to the database directly.
is there another way to make it dynamic?

1 Like

Hi there :slight_smile:

This is a great question!

This thread may be a good place to start: https://www.wix.com/corvid/forum/community-feature-request/adding-video-to-dynamic-pages

its not possible to connect an iframe to database due to website security… you can only do it with elements inside of Wix because if it was possible you could just simply hack a website by its URL…

you will have to use your own content

Thanks, I have already connected the video successfuly with a regular Youtube component, but I need it to be embedded just because I want to disable the related videos in the end.

You can inject your code into the iFrame dynamically using https://www.wix.com/corvid/reference/$w.HtmlComponent.html#postMessage

I’ll check that! Thanks