How can I embed a live stream video chat iFrame with a dynamic id from a collection item using Webflow?

Published on
September 22, 2023

To embed a live stream video chat iFrame with a dynamic ID from a collection item using Webflow, you can follow these steps:

  1. Create a Collection: Start by creating a Collection in Webflow to store the relevant information for each video chat. This could include fields like ID, URL, and any other necessary details.

  2. Design a Collection Template page: Next, design a Collection Template page where the video chat will be displayed. This is where you'll need to embed the iFrame.

  3. Add an Embed element: On the Collection Template page, add an Embed element where you want the video chat to appear. You can find this element in the Elements panel on the right-hand side of the Webflow Designer.

  4. Set the iFrame source dynamically: Double-click the Embed element to open the Embed settings panel. Here, you can set the source of the iFrame dynamically based on the dynamic ID from the collection item.

  5. Use custom code: In the Embed settings panel, select "Custom code" from the "Type" drop-down menu. Then, you can use custom code to generate the iFrame URL dynamically using the dynamic ID from the collection item.

  6. Reference the dynamic ID: You can reference the dynamic ID from the collection item using Webflow's Template syntax. For example, if the dynamic ID field is named "VideoID" in the Collection, you can use the following code in the custom code input:

    <iframe src="https://your-live-stream-url.com/{{collectionitem.VideoID}}"></iframe>

    Replace "https://your-live-stream-url.com/" with the actual URL of your live stream.

  7. Preview and publish: Preview the Collection Template page to ensure that the iFrame is embedded correctly. If everything looks good, publish your Webflow project to make it live on the web.

By following these steps, you will be able to embed a live stream video chat iFrame with a dynamic ID from a collection item in Webflow.

Additional questions:

  1. How can I embed a live video chat using Webflow?
  2. How to create a Collection Template page in Webflow?
  3. What is the use of an iFrame in Webflow?