3 ms·
You don't need media support in video for prefers-color-scheme. Just include both dark/light versions of the videos and hide/show from CSS.
by phillipseamore 5y ago
You don't need media support in video for prefers-color-scheme. Just include both dark/light versions of the videos and hide/show from CSS.
- chrismorgan 5y agoMuch the same is true of picture sources (though I’d guess—without having checked—that browsers are more likely to start downloading images before realising they are display:none than they are videos). The theory behind <source> is that all of the offered sources are equivalent in some way, which for audio and video would strongly imply temporal equivalence, meaning that if the media query match changes, it should swap the source and continue where you’re up to. This, incidentally, is where DASH/HLS would be really helpful, to make it easier to transition from one source to another with no pause. Whereas if you do two videos and hide the one that doesn’t match, and you have a computer that switches to dark mode at sunset or based on ambient light, your video is going to stop playing and you’ll lose your place as soon as it switches from dark to light or light to dark.
- phillipseamore 5y agoAnd that's precisely the reason it was removed from the specs. There are so many moving things that need to be done right and in the end it all hinges on the media authoring being done right (which is why the HLS/DASH specs are valuable). I went over some of these things a few months ago: https://github.com/filamentgroup/html-video-responsive/issues https://github.com/filamentgroup/html-video-responsive/issue...