Playing media files out of the box on macOS is a pretty lousy experience. So, we have to rely on 3rd party software.
Most of us use VLC, and we’ve been using it for years. So maybe, we’re due for an update. Here’s IINA.
IINA is a free and open-source media player for macOS that’s based on MPV. It can play pretty much anything you throw at it ( even GIFs ), supports web streams, has support for PiP, supports playlists and chapters, comes with support for Force Touch and Touch Bar and so much more. The only thing IINA is missing is AirPlay support. And it uses less resources than VLC.
Also, you can install the IINA Safari extension to play any web video in IINA. There’s also a Chrome extension, but I’m not going to link to it because I don’t recommend using Chrome. Or any other Google products/services. On any device.