Jump to content

custom iframe attribute for video embed

Recommended Posts

Site URL: https://www.seismic-change.com

 I have an iframe embedding a background Vimeo video for a background video on a section with fallback image.

The iframe html looks like this 

<iframe id="vimeoplayer" src="//player.vimeo.com/video/530249205?api=1&amp;background=1" class="background-video ready" style="width: 1489px; height: 837.5625px; left: 0px; top: -290.78125px;"></iframe>

I would like to add a custom parameter as documented here https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters.

The parameter I would like to add the Do Not Track parameter or dnt=true

I have tried adjusting with javascript using jQuery on ready to look like this however it appears that this does not have the desired affect as cookies and analytics are still showing

<iframe id="vimeoplayer" src="//player.vimeo.com/video/530249205?api=1&amp;background=1&amp;dnt=true" class="background-video ready" style="width: 1489px; height: 837.5625px; left: 0px; top: -290.78125px;"></iframe>

Are there any plans to support custom attributes in background vimeo iframes. At the moment it appears all attributes are stripped out or sanitised. Alternatively, is there a way to embed an iframe as part of a custom html page, say in a manner similar to how a section is currently put together?

Link to comment
On 4/29/2021 at 7:54 PM, Danlobo said:

Site URL: https://www.seismic-change.com

 I have an iframe embedding a background Vimeo video for a background video on a section with fallback image.

The iframe html looks like this 


<iframe id="vimeoplayer" src="//player.vimeo.com/video/530249205?api=1&amp;background=1" class="background-video ready" style="width: 1489px; height: 837.5625px; left: 0px; top: -290.78125px;"></iframe>

I would like to add a custom parameter as documented here https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters.

The parameter I would like to add the Do Not Track parameter or dnt=true

I have tried adjusting with javascript using jQuery on ready to look like this however it appears that this does not have the desired affect as cookies and analytics are still showing


<iframe id="vimeoplayer" src="//player.vimeo.com/video/530249205?api=1&amp;background=1&amp;dnt=true" class="background-video ready" style="width: 1489px; height: 837.5625px; left: 0px; top: -290.78125px;"></iframe>

Are there any plans to support custom attributes in background vimeo iframes. At the moment it appears all attributes are stripped out or sanitised. Alternatively, is there a way to embed an iframe as part of a custom html page, say in a manner similar to how a section is currently put together?

Gallery section video did not provide much control over the video parameters, I think you should place the video in a code block or embed block and turn it into background using javascript

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.