How do you embed video in HTML? I will tell you, and you will be sorry I did. All major video hosting sites provide code to embed like this:
<iframe width="560" height="315" src="https://www.youtube.com/embed/iSr8W5HQyx8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe src="https://player.vimeo.com/video/1336787?h=19c3e46645" width="640" height="480" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;"> <iframe style="width:100%;height:100%;position:absolute;left:0px;top:0px;overflow:hidden" frameborder="0" type="text/html" src="https://www.dailymotion.com/embed/video/x795dxr" width="100%" height="100%" allowfullscreen > </iframe> </div>
<iframe class="rumble" width="640" height="360" src="https://rumble.com/embed/v1akgxh/?pub=d4pwl" frameborder="0" allowfullscreen></iframe>
<iframe width="640" height="360" scrolling="no" frameborder="0" style="border: none;" src="https://www.bitchute.com/embed/Jfs1PjbpIPxQ/"></iframe>
These are all iframe cases. Of course bitchute is the most moronic because it doesn't allow full screen. But all of these are full of useless junk. Every single one works fine with a basic template of:
<iframe width="560" height="315" src="https://www.youtube.com/embed/iSr8W5HQyx8" frameborder="0" allowfullscreen></iframe>
So why do they add all the useless crap? Because they are modern scum, that's why.
Of course I have left out the most important video site for modern scum:
<blockquote class="tiktok-embed" cite="https://www.tiktok.com/@chantelleef/video/7112118342181276933" data-video-id="7112118342181276933" style="max-width: 605px;min-width: 325px;" > <section> <a target="_blank" title="@chantelleef" href="https://www.tiktok.com/@chantelleef">@chantelleef</a> <p>perfect for those with ADHD & anxiety wow</p> <a target="_blank" title="♬ Just White Noise - White Noise" href="https://www.tiktok.com/music/Just-White-Noise-6815049125923391489">♬ Just White Noise - White Noise</a> </section> </blockquote> <script async src="https://www.tiktok.com/embed.js"></script>
A different approach, but again full of useless crap. This can be reduced to:
<blockquote class="tiktok-embed" data-video-id="7112118342181276933" style="max-width: 605px;"><section></section></blockquote>
<script async src="https://www.tiktok.com/embed.js"></script>
Same result.
And finally video files:
<video controls width="560"><source src="https://samplelib.com/lib/preview/mp4/sample-5s.mp4"></video>
This is the simplest but the result sucks. It seems to download the file before running it and to have pathetic controls.
Now I will get to the point of this post. Consider how images are embedded:
<img src="https://images.panda.org/assets/images/pages/welcome/orangutan_1600x1000_279157.jpg">
That's it. So why the hell can't videos be this simple? Because images were handled before programmers turned to scum and videos were handled afterward. Videos should be handled by a simple video tag like this:
<video src="https://www.youtube.com/embed/iSr8W5HQyx8"></video>
That's it, nothing else. Basically the browser should do a head request to the URL which should return a header which specifies where to find the javascript to handle the video. This javascript can then do whatever it wants including inserting stuff inside the video tag to render the video with controls. Size should be handled in CSS. Optional parameters could be added to the video tag and interpreted by the javascript.
I have been working on video handling for FreedIt and I am again reminded that modern scum can do nothing right. Everything they touch is a disgusting mess, videos in HTML just being the example of this that I am dealing with at the moment. Before this I looked at selection ranges for Javascript, another disgusting mess. Please remember that everything modern scum produce is shit, and this is why they should be exterminated.
there doesn't seem to be anything here