If we just had some sort of file-extension/media-type (.webg, maybe?) that signalled to a browser "I'm a video container, but treat me like a gif, by defaulting to autoplaying, looping, and muting me", we'd replace gifs instantly.
If we just had some sort of file-extension/media-type (.webg, maybe?) that signalled to a browser "I'm a video container, but treat me like a gif, by defaulting to autoplaying, looping, and muting me", we'd replace gifs instantly.
The big advantage of GIF is that it works in an <img> tag just like any other image, so you don't need a website to explicitly support it.
Another advantage, I think, is that GIFs are guaranteed not to play sound, which is great when browsing say imgur.com or pr0gramm.com at work (edit: of well, I had missed the "muting me" part of your comment, so let's just say that we agree that it's an important component).
On the other hand, users don't have to know whether the HTML they are served have <video>s or <img>s, so this could all be done behind the scenes, I guess.
You don't need any special containers. Just use video tag properly, it covers all that functionality since the beginning:
https://developer.mozilla.org/docs/Web/HTML/Element/video
Something like <video src="..." loop="true" autoplay="true" muted="true".../>
Muting can also be simply achieved by making audio empty in the video if you need to.
On sites where you control the HTML, like Wordpress, you can do whatever you like. Use <video> tags if you know them. Likewise, on sites where you don't write HTML (e.g. Facebook, as another poster mentioned), <video> tags are fine--because people don't have to know about them, so it's all just handled in the background when you drop a video on the page.
But there are these in-between web services where HTML is used, usually as one method of several, to get rich text from people, and then presented in an aggregate view (think of any traditional threaded forum.)
Because people can do some pretty nasty things when you inject their HTML directly into your pages, you have to filter that HTML to remove bad behavior. And usually <video> is one of the first to go--not because it's particularly bad (though getting people to autoload huge videos can be used as a DDoS attack in some instances) but because these filters are usually whitelist-based, and haven't been updated since <video> became a thing.