Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
detect-audio-video
Advanced tools
Detect audio and video features in browser.
npm i --save-dev detect-audio-video
import {
isWideGamutSupported,
isSrgbSupported,
isP3Supported,
isRec2020Supported,
getDevicePixelRatio,
getScreenWidth,
getScreenHeight,
getResolutionBadge,
isHighDynamicRangeSupported,
isHighVideoDynamicRangeSupported,
} from 'detect-audio-video';
console.log('isWideGamutSupported: ', isWideGamutSupported()); // boolean
console.log('isSrgbSupported: ', isSrgbSupported()); // boolean
console.log('isP3Supported: ', isP3Supported()); // boolean
console.log('isRec2020Supported: ', isRec2020Supported()); // boolean
console.log('getDevicePixelRatio: ', getDevicePixelRatio()); // number
// Get screen width with device pixel ratio
console.log('getScreenWidth: ', getScreenWidth()); // number
// Get screen height with device pixel ratio
console.log('getScreenHeight: ', getScreenHeight()); // number
console.log('getResolutionBadge: ', getResolutionBadge()); // string, example: "4K"
console.log('isHighDynamicRangeSupported: ', isHighDynamicRangeSupported()); // boolean
console.log('isHighVideoDynamicRangeSupported: ', isHighVideoDynamicRangeSupported()); // boolean
import {
getGpuVendor,
getGpuRenderer,
hasHardwareAcceleration,
isAppleSilicon,
} from 'detect-audio-video';
console.log('getGpuVendor: ', getGpuVendor()); // string, example: "Apple"
console.log('getGpuRenderer: ', getGpuRenderer()); // string, example: "Apple M1, or similar"
console.log('hasHardwareAcceleration: ', hasHardwareAcceleration()); // boolean
console.log('isAppleSilicon: ', isAppleSilicon()); // boolean
import {
isNativeHlsSupported,
isNativeMpdSupported,
isNativeMssSupported,
} from 'detect-audio-video';
console.log('isNativeMssSupported: ', isNativeMssSupported()); // boolean
console.log('isNativeHlsSupported: ', isNativeHlsSupported()); // boolean
console.log('isNativeMpdSupported: ', isNativeMpdSupported()); // boolean
MIT
FAQs
Detect audio and video features in browser
The npm package detect-audio-video receives a total of 444 weekly downloads. As such, detect-audio-video popularity was classified as not popular.
We found that detect-audio-video demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.