Our goal is to analyse and understand global codec adoption trends by collecting data for AV1, H.265 and H.264 support across different countries.
How was this accomplished
The canPlayType method enabled us to query the browser's support for specific media types, providing insight into the playback capabilities of each codec. Similarly, MediaSource.isTypeSupported allowed us to directly check if a given media type is supported by the browser's media source implementation.
Additionally, by utilizing navigator.mediaCapabilities.decodingInfo, we gained access to detailed information about the browser's decoding capabilities, empowering us to assess codec compatibility at a deeper level. This method provided insights into the device's hardware and software decoding capabilities, offering valuable data for our evaluations.
By making use of these tools, we were able to determine the compatibility of AV1, H.265 and H.264 codecs across different browsers and environments.
These were the base codecs we chose:
- AV1: 'av01.0.05M.08'
- H.264: 'avc1.4d4015'
- H.265: 'hev1.1.3.L93.90'
Overcoming Codec Compatibility Challenges
Our development team tested the different codecs to evaluate their current level of support. This initiative provided valuable real-world insights into the adoption trends of different codecs, aiding us in understanding their varying levels of acceptance across platforms and devices. As we delved more into testing codec support across different browsers/devices, we realized that understanding full codec support across devices, such as H.265 on iPhones, can be complex task as we were often misled by false positives during the testing phase.
Recognizing the comprehensive support for H.265 on iPhones from iOS 11 onwards, we refined our approach to reflect this established compatibility. This adjustment allowed us to confidently leverage H.265 in our codec assessments, ensuring accurate evaluations across various devices and platforms. Additionally, we streamlined our testing protocols to prioritize platforms where H.265 is known to function reliably, optimizing our resource allocation and enhancing overall testing efficiency.
Help Us Out!
If you'd like to help us gather more stats, throw this code at the bottom of your site:
<script type="module" src="https://stats.slashed.cloud/codec-support.js"></script>
This script will enable the collection of data regarding codec support from users who visit your site. By integrating this link, you contribute to a broader understanding of codec compatibility across different browsers and platforms.
You can simply add the following line of code within the
<body> tag, ideally towards the end, just before the closing
</body> tag, in your HTML file. This will ensure that the script is loaded after your main content, allowing it to gather statistics on codec support effectively.