Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

detect-audio-video

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-audio-video - npm Package Compare versions

Comparing version 0.12.0 to 0.12.1

19

dist/index.js

@@ -158,12 +158,19 @@ const AAC_CONTENT_TYPE = 'audio/mp4; codecs="mp4a.40.2"';

function isHdrScreenSupported() {
let result = false;
try {
result = window.matchMedia('(dynamic-range: high)').matches ||
// https://developer.mozilla.org/en-US/docs/Web/CSS/@media/video-dynamic-range
// For Firefox users on macOS 11+ (with HDR-compatible screens)
window.matchMedia('(video-dynamic-range: high)').matches;
const isHighSupported = checkDynamicRange('high');
const isStandardSupported = checkDynamicRange('standard');
if (!isStandardSupported) {
return undefined;
}
return Boolean(isStandardSupported && isHighSupported);
}
catch (e) { }
return result;
return undefined;
}
function checkDynamicRange(type) {
return window.matchMedia(`(dynamic-range: ${type})`).matches ||
// https://developer.mozilla.org/en-US/docs/Web/CSS/@media/video-dynamic-range
// For Firefox users on macOS 11+ (with HDR-compatible screens)
window.matchMedia(`(video-dynamic-range: ${type})`).matches;
}
// 15360×8640

@@ -170,0 +177,0 @@ const SCREEN_WIDTH_16K = 15360;

@@ -5,3 +5,3 @@ export declare function getDevicePixelRatio(): number;

export declare function getScreenDepth(): number;
export declare function isHdrScreenSupported(): boolean;
export declare function isHdrScreenSupported(): boolean | undefined;
export declare function is16KScreenSupported(width?: number): boolean;

@@ -8,0 +8,0 @@ export declare function is10KScreenSupported(width?: number): boolean;

{
"name": "detect-audio-video",
"version": "0.12.0",
"version": "0.12.1",
"description": "Detect audio video features",

@@ -5,0 +5,0 @@ "module": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc