LuanaBorgia Posted July 13, 2020 Share Posted July 13, 2020 (edited) Hi, with old version of Prestashop 1.7.6.7 it was easy to make.Iframe YES, Html Purifier NO! With this version it's impossible, I have try with integrated html editor,with contentbox and htmlbox. How do I solve? Thanks Edited July 16, 2020 by LuanaBorgia (see edit history) Link to comment Share on other sites More sharing options...
prestamonste Posted July 14, 2020 Share Posted July 14, 2020 (edited) Hi there, Did you turn on the option "Allow iframes on HTML fields"? I checked, it works fine on the PS version 1.7.x. Thanks, Edited July 14, 2020 by prestamonste (see edit history) Link to comment Share on other sites More sharing options...
LuanaBorgia Posted July 14, 2020 Author Share Posted July 14, 2020 Hi prestamonste, yes, I have turn on iframe and disable html purify but nothing. The video show first frame but don't start, it's ok when click con video (or youtube). What version you use? Link to comment Share on other sites More sharing options...
prestamonste Posted July 14, 2020 Share Posted July 14, 2020 Hi there, I tested it on PS 1.7.6.7. It works fine. You can see it in here (Tab product detail): https://ps17.demoprestamonster.com/home-accessories/19-customizable-mug.html And you need to add with source code: Link to comment Share on other sites More sharing options...
LuanaBorgia Posted July 14, 2020 Author Share Posted July 14, 2020 Now i reset all site! Excuse me, can you try on Home page? Yesterday I have try here! Link to comment Share on other sites More sharing options...
prestamonste Posted July 14, 2020 Share Posted July 14, 2020 Yes, you can see it in here: https://ps17.demoprestamonster.com/ In the block custom text block Link to comment Share on other sites More sharing options...
LuanaBorgia Posted July 14, 2020 Author Share Posted July 14, 2020 38 minutes ago, prestamonste said: Yes, you can see it in here: https://ps17.demoprestamonster.com/ In the block custom text block I see, thanks for help BUT there is the same error. In my 2 browser video NOT start when open browser, Prestashop need click to start video Link to comment Share on other sites More sharing options...
prestamonste Posted July 14, 2020 Share Posted July 14, 2020 If you want to the video start when open browser, you need to add the param in the iframe: <iframe width="560" height="315" src="https://www.youtube.com/embed/MrOAmysdycA?autoplay=1" frameborder="0" allow="autoplay"></iframe> And it only auto start on chrome, Edge (not work on firefox). If you add the param <iframe width="560" height="315" src="https://www.youtube.com/embed/MrOAmysdycA?autoplay=1&mute=1" frameborder="0" allow="autoplay"></iframe> The video start on the firefox (but muted). You can read more it in here: https://stackoverflow.com/questions/7281765/how-to-embed-an-autoplaying-youtube-video-in-an-iframe 1 Link to comment Share on other sites More sharing options...
LuanaBorgia Posted July 14, 2020 Author Share Posted July 14, 2020 Yeahhh it's perfect! 😍 Thanks, but only the last question, for a normal mp4 video (not Youtube), to start on opening what's the right command? I have try <video controls autoplay><source src="movie.mp4" type="video/mp4"></video> but not start (only first frame in pause) Thanks Link to comment Share on other sites More sharing options...
prestamonste Posted July 15, 2020 Share Posted July 15, 2020 Hi there, With mp4 video, it doesn't auto play, because after saving form, the attribute controls autoplay has been removed. Thanks, Link to comment Share on other sites More sharing options...
LuanaBorgia Posted July 15, 2020 Author Share Posted July 15, 2020 Damn!!! This is a big problem... do you know a workaround for this? (without use Youtube). Other format that stream with autoplay... Link to comment Share on other sites More sharing options...
LuanaBorgia Posted July 16, 2020 Author Share Posted July 16, 2020 Ok, after many errors i find the solution. The video must be MUTED! I use this code: <video width="100%" height="auto" muted="" autoplay="autoplay" controls="controls" controlslist="nodownload"><source src="video.mp4" type="video/mp4" /></video> I hope that this code can help someone. Bye Bye Link to comment Share on other sites More sharing options...
lingmaaki Posted May 31, 2021 Share Posted May 31, 2021 You cannot display a lot of websites inside an iFrame. Reason being that they send an "X-Frame-Options: SAMEORIGIN" response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page. I faced the same error when displaying YouTube links. For example: https://www.youtube.com/watch?v=8WkuChVeL0s I replaced watch?v= with embed/ so the valid link will be: https://www.youtube.com/embed/8WkuChVeL0s It works well. (Reason : /embed has the required header) Try to apply the same rule on your case. Why is X-Frame-Options It is there for user security. Prevents clickjacking : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options The embed endpoint is desinged to be safer to show on external websites (not youtube.com). SAMEORIGIN The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now