media/base/mime_util.cc - defines canPlayType() behaviour and file extension mapping
media/blink/buffered_data_source.{cc,h} - Chromium's main implementation of DataSource for the media pipeline
media/blink/buffered_resource_loader.{cc,h} - Implements the sliding window buffering strategy (see below)
third_party/blink/public/platform/web_media_player.h - Blink's media player interface for providing HTML5 audio/video functionality
media/blink/webmediaplayer_impl.{cc,h} - Chromium's main implementation of WebMediaPlayer
How does everything get instantiated?
WebFrameClient::createMediaPlayer() is the Blink embedder API for creating a WebMediaPlayer and passing it back to Blink. Every HTML5 audio/video element will ask the embedder to create a WebMediaPlayer.
For Chromium this is handled in RenderFrameImpl.
GN Flags
There are a few GN flags which can alter the behaviour of Chromium's HTML5 audio/video implementation.ffmpeg_branding
Default: $(branding)
Chrome - includes additional proprietary codecs (MP3, etc.) for use with Google Chrome
Alters the list of codecs Chromium claims to support, which affects and canPlayType() behaviour
Values:
0/false - and canPlayType() assume the default set of codecs
1/true - and canPlayType() assume they support additional proprietary codecs