Scott Jehl speaks out:
Removing media support from HTML videos is a bug. This means that for every video we embed in HTML, we have to choose to provide source files that may be too large or too small for many user devices (which lead to poor performance, waste of data, and even poor quality on large screens), or to turn to more complex server-side, scripting, or third-party solutions to provide the correct size.
I remember when the responsive images first appeared. One way to explain it is to say it's like<video></video>
Tags, you can have multiple elements inside (in supported browsers), allowing you to specify properties such as type (such as video format) and media (such as screen size). But then...
Although the feature has been implemented in multiple browsers, it has been removed from the browser and HTML specifications without any functional alternatives. One exception is that the feature was never removed from WebKit, so it still works in the Safari browser, which is fine.
I don't remember it. It feels like a huge WTF moment (some background). I think the network is excellent in backward compatibility. We rarely delete things directly, and it is even rarer to delete things without alternatives.
So now the responsive image has succeeded (it is successful, right? I can't imagine how much bandwidth it saves for the world)… Can't we... put it back?
When I need this feature right away, I always think of Cloudinary because I can change the size and format of the video by changing the URL. For example, this is a video URL where the video codec is automatically determined and the size is forced to be reduced to 400 pixels:
<code>https://res.cloudinary.com/css-tricks/video/upload/c_scale,q_auto,vc_auto,w_400/v1612795501/intro-patreon_jpd8er.mp4</code>
It's great to have a tool like this, but that doesn't mean the platform shouldn't help.
The above is the detailed content of HTML Video Sources Should Be Responsive. For more information, please follow other related articles on the PHP Chinese website!

CSS Grid is a powerful tool for creating complex, responsive web layouts. It simplifies design, improves accessibility, and offers more control than older methods.

Article discusses CSS Flexbox, a layout method for efficient alignment and distribution of space in responsive designs. It explains Flexbox usage, compares it with CSS Grid, and details browser support.

The article discusses techniques for creating responsive websites using CSS, including viewport meta tags, flexible grids, fluid media, media queries, and relative units. It also covers using CSS Grid and Flexbox together and recommends CSS framework

The article discusses the CSS box-sizing property, which controls how element dimensions are calculated. It explains values like content-box, border-box, and padding-box, and their impact on layout design and form alignment.

Article discusses creating animations using CSS, key properties, and combining with JavaScript. Main issue is browser compatibility.

Article discusses using CSS for 3D transformations, key properties, browser compatibility, and performance considerations for web projects.(Character count: 159)

The article discusses using CSS gradients (linear, radial, repeating) to enhance website visuals, adding depth, focus, and modern aesthetics.

Article discusses pseudo-elements in CSS, their use in enhancing HTML styling, and differences from pseudo-classes. Provides practical examples.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version
SublimeText3 Linux latest version

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools
