WordPress 5.8.1 does not show Video Player inside Spoiler HTML5 details
-
I have WordPress 5.8.1 installed on my site
On some pages I use HTML5 Spoiler <details>. I recently discovered that the video player in this spoiler is not showing after posting.
Everything works well in the admin panel (… wp-admin / post php? …), the video player is shown.
Another odd thing for me is that the player appears on the published page if I open the DevTools in the browser.Can someone tell me what the error is and how to fix it? Someone may have encountered this before.
My html code to embed video in spoiler:
<details> <summary>Watch video lessons:</summary> <p>Video tutorial: Talking tree (basic use)</p> <div class="outer-wrapper"><div class="video-container"><iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/ZHmFW0lNspc?rel=0&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen></iframe></div></div> <p>Talking machine (how to apply Auto Lip-Sync to a moving object)</p> <div class="outer-wrapper"><div class="video-container"><iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/PVcsoULpDYI?rel=0&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen></iframe></div></div> </details>
At the time of posting, I am using an HTML block in Gutenberg to insert this code.
My CSS code:
/** Spoiler html5 */ details[open] { margin-bottom: 2%; background-color: #ecf0f1; padding: 10px; } summary::-webkit-details-marker { color: #1e90ff; } summary { display: block; width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; border-bottom: 1px dotted; font-weight: bold; cursor: pointer; outline-style: none; margin: 20px 20px 28px 20px; } /** Video - Wrapper for the player */ .outer-wrapper { width: 100%; max-width: 560px; margin: 0 0 10px; } .video-container { padding-top: 25px; padding-bottom: 56.25%; display: block; height: 0; overflow: hidden; position: relative; z-index: 1; margin: auto; } iframe, video { display: block; height: 100%; width: 100%; position: absolute; top: 0; z-index: 5; left: 0; }
- This topic was modified 3 years, 1 month ago by . Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
The page I need help with: [log in to see the link]
- The topic ‘WordPress 5.8.1 does not show Video Player inside Spoiler HTML5 details’ is closed to new replies.