That’s working for youtube! Thanks! Do you know how to make the embed responsive?
For others’ info, this is what I did:
- in settings / allowed iframes, add
https://www.youtube.com/embed/ - In the group about description, add the iframe code directly (you may have to also make another change to the text and save it for clear cache reasons). Example iframe code:
<iframe width="560" height="315" src="https://www.youtube.com/embed/CTsB-llTzyc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
But: How to make the iframe responsive? The normal advice is to wrap the iframe in a div, and give it a class, like “iframe-container”, and add css like this:
.iframe-container {
overflow:hidden;
padding-bottom:56.25%;
position:relative;
height:0;
}
.iframe-container iframe{
left:0;
top:0;
height:100%;
width:100%;
position:absolute;
}
I think this css is solid, but for some reason, when I wrap my iframe in a div in the group about section, and give that div a class, the class is not saving in the displayed text. So, when I look in the inspector, it just shows a div, without a class. Therefore, the css is not being applied, and the iframe is not responsive. Any ideas how to correct?