We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
lisarosado
3 years agoExplorer | Level 3
Embedded iframe link to video doesn't work for some videos.
in chrome the console error is: Refused to frame 'https://www.dropbox.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'". in firefox ...
lisarosado
3 years agoExplorer | Level 3
Hmm that wouldn't make sense if some videos are working and others are not. I do not have a publicly accessible version of this page to show you unfortunately. I'm not sure how this "Based on the error message, it looks like this may be because your site that displays the Embedder is itself being framed by a different site." would be possible. It's a react app and I am including it like so
```<iframe
frameBorder={0}
src={`${video}?raw=1&autoplay=1`}
height="480px"
width="640px"
title="Resource Video"
allowFullScreen
/>```
the video link is the same link you would use to share it, however I strip out the query args from that share url. So the url ends up being the share url minus the original ?dl=0 or whatever else is included, and then I add raw=1&autoplay=1
Again, this works for some videos with 0 change in setup, except that the link changes. There's no discernable difference between the videos. If you wanted to take this chat to email so this isn't publicly viewable I could send you the resource links.
Здравко
3 years agoLegendary | Level 20
lisarosado wrote:...
the video link is the same link you would use to share it, however I strip out the query args from that share url. So the url ends up being the share url minus the original ?dl=0 or whatever else is included, and then I add raw=1&autoplay=1
...
Hi lisarosado,
Can you take a look once again on the sets of link that work and the other that don't work? Is, by any chance, the only difference between the two groups availability of rlkey link parameter? 🧐
If so, that's the reason. It's never good idea to 'strip out query args'! If you need to change/replace particular parameter, just do it; without messing the others. 😉
Good luck.
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!