Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

custom iframe attribute for video embed


Danlobo

Question

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

1 answer to this question

Recommended Posts

  • 0
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

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for Squarespace
If you find my answer fit your need, 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...