philgyford/daily-paper

Fix size of video embeds

Closed this issue · 0 comments

Video figures are often the wrong size for the iframes they contain. Maybe need to catch them during python processing and add extra HTML classes/elements?

Examples:

<figure class="element element-video" data-canonical-url="http://www.youtube.com/watch?v=xRjvmVaFHkk">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/xRjvmVaFHkk?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=xRjvmVaFHkk">Watch the trailer for Joker.</a></figcaption>
</figure>
<figure class="element element-video" data-canonical-url="http://www.youtube.com/watch?v=0oePXZdY75o">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/0oePXZdY75o?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=0oePXZdY75o">Watch a trailer for Good Posture.</a></figcaption>
</figure>
<figure class="element element-video" data-canonical-url="https://www.youtube.com/watch?v=lekmh2KLvM4">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/lekmh2KLvM4?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=lekmh2KLvM4">Watch a trailer for Judy.</a></figcaption>
</figure>
<figure class="element element-video" data-canonical-url="http://www.youtube.com/watch?v=MwD0uete7f8">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/MwD0uete7f8?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=MwD0uete7f8">Watch a trailer for Werewolf.</a></figcaption>
</figure>
<figure class="element element-video" data-canonical-url="http://www.youtube.com/watch?v=EC3GH3acHvs">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/EC3GH3acHvs?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=EC3GH3acHvs">Watch the trailer for Harry Birrell Presents Films of Love and War.</a></figcaption>
</figure>
<figure class="element element-video" data-canonical-url="https://www.youtube.com/watch?v=aXmGpLYiFWU">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/aXmGpLYiFWU?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=aXmGpLYiFWU">Watch Judy Garland and Gene Kelly’s Be a Clown routine.</a></figcaption>
</figure>
<figure class="element element-video" data-canonical-url="http://www.youtube.com/watch?v=6uaN60k0-zY">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/6uaN60k0-zY?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=6uaN60k0-zY">Watch the video for Lark by Angel Olsen.</a></figcaption>
</figure>
<figure class="element element-video" data-canonical-url="http://www.youtube.com/watch?v=P2Gbbd6pVMg">
    <iframe height="259" width="460" src="https://www.youtube-nocookie.com/embed/P2Gbbd6pVMg?wmode=opaque&amp;feature=oembed" frameborder="0" allowfullscreen="" style="height: 259px;"></iframe>
    <figcaption><a href="https://www.youtube.com/watch?v=P2Gbbd6pVMg">Watch the video for Everyone Hides by Wilco.</a></figcaption>
</figure>