detect-audio-video
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -1,8 +0,12 @@ | ||
export declare function isACCSupported(): boolean; | ||
export declare function isAccSupported(): boolean; | ||
export declare function isDolbyDigitalSupported(): boolean; | ||
export declare function isDolbyDigitalPlusSupported(): boolean; | ||
export declare function isDolbyAtmosSupported(): boolean; | ||
export declare function isMpegHAudioSupported(): boolean; | ||
export declare function isDolbyAtmosSupported(): boolean; | ||
export declare function isVorbisSupported(): boolean; | ||
export declare function isFlacSupported(): boolean; | ||
export declare function isOpusSupported(): boolean; | ||
export declare function isDtsSupported(): boolean; | ||
export declare function isDtsHdSupported(): boolean; | ||
export declare function isDtsExpressSupported(): boolean; | ||
export declare function isDtsXSupported(): boolean; |
export * from './audio'; | ||
export * from './drm/index'; | ||
export * from './screen'; | ||
export * from './contentTypes'; | ||
export * from './contentTypes/audio'; | ||
export * from './contentTypes/video'; | ||
export * from './contentTypes/text'; | ||
export * from './isTypeSupported'; | ||
export * from './gpu'; |
@@ -1,8 +0,5 @@ | ||
const H264_BASELINE_CONTENT_TYPE = 'video/mp4; codecs="avc1.42E01E"'; | ||
const H264_MAIN_CONTENT_TYPE = 'video/mp4; codecs="avc1.4D401E"'; | ||
const H264_HIGH_CONTENT_TYPE = 'video/mp4; codecs="avc1.64001E"'; | ||
const ACC_CONTENT_TYPE = 'audio/mp4; codecs="mp4a.40.2"'; | ||
const AC3_CONTENT_TYPE = 'audio/mp4; codecs="ac-3"'; | ||
const EC3_CONTENT_TYPE = 'audio/mp4; codecs="ec-3"'; | ||
const MPEGH_AUDIO_CONTENT_TYPE = 'audio/mp4; codecs="mhm1.0x0D"'; | ||
const DOLBY_AC3_CONTENT_TYPE = 'audio/mp4; codecs="ac-3"'; | ||
const DOLBY_EC3_CONTENT_TYPE = 'audio/mp4; codecs="ec-3"'; | ||
const DOLBY_AC4_CONTENT_TYPE = 'audio/mp4; codecs="ac-4"'; | ||
const DOLBY_ATMOS_CONTENT_TYPE = 'audio/mp4; codecs="ec-3"; spatialRendering=true'; | ||
@@ -12,2 +9,14 @@ const VORBIS_CONTENT_TYPE = 'audio/mp4; codecs="vorbis"'; | ||
const FLAC_CONTENT_TYPE = 'audio/mp4; codecs="flac"'; | ||
const MPEG_H_AUDIO_LC_PROFILE_LEVEL_1_CONTENT_TYPE = 'audio/mp4; codecs="mhm1.0x0B"'; | ||
const MPEG_H_AUDIO_LC_PROFILE_LEVEL_2_CONTENT_TYPE = 'audio/mp4; codecs="mhm1.0x0C"'; | ||
const MPEG_H_AUDIO_LC_PROFILE_LEVEL_3_CONTENT_TYPE = 'audio/mp4; codecs="mhm1.0x0D"'; | ||
const MPEG_H_AUDIO_LC_PROFILE_LEVEL_1_MULTISTREAM_CONTENT_TYPE = 'audio/mp4; codecs="mhm2.0x0B"'; | ||
const MPEG_H_AUDIO_LC_PROFILE_LEVEL_2_MULTISTREAM_CONTENT_TYPE = 'audio/mp4; codecs="mhm2.0x0C"'; | ||
const MPEG_H_AUDIO_LC_PROFILE_LEVEL_3_MULTISTREAM_CONTENT_TYPE = 'audio/mp4; codecs="mhm2.0x0D"'; | ||
const DTS_CORE_CONTENT_TYPE = 'audio/mp4; codecs="dtsc"'; | ||
const DTS_HD_CORE_PLUS_EXTENSION_CONTENT_TYPE = 'audio/mp4; codecs="dtsh"'; | ||
const DTS_HD_LBR_CONTENT_TYPE = 'audio/mp4; codecs="dtse"'; | ||
const DTS_UHD_PROFILE_2_CONTENT_TYPE = 'audio/mp4; codecs="dtsx"'; | ||
const DTS_UHD_PROFILE_3_CONTENT_TYPE = 'audio/mp4; codecs="dtsy"'; | ||
const XHE_AAC_CONTENT_TYPE = 'audio/mp4; codecs="mp4a.40.42"'; | ||
@@ -26,17 +35,17 @@ function isTypeSupported(value) { | ||
function isACCSupported() { | ||
function isAccSupported() { | ||
return isTypeSupported(ACC_CONTENT_TYPE); | ||
} | ||
function isDolbyDigitalSupported() { | ||
return isTypeSupported(AC3_CONTENT_TYPE); | ||
return isTypeSupported(DOLBY_AC3_CONTENT_TYPE); | ||
} | ||
function isDolbyDigitalPlusSupported() { | ||
return isTypeSupported(EC3_CONTENT_TYPE); | ||
return isTypeSupported(DOLBY_EC3_CONTENT_TYPE); | ||
} | ||
function isMpegHAudioSupported() { | ||
return isTypeSupported(MPEGH_AUDIO_CONTENT_TYPE); | ||
} | ||
function isDolbyAtmosSupported() { | ||
return isTypeSupported(DOLBY_ATMOS_CONTENT_TYPE); | ||
} | ||
function isMpegHAudioSupported() { | ||
return isTypeSupported(MPEG_H_AUDIO_LC_PROFILE_LEVEL_3_CONTENT_TYPE); | ||
} | ||
function isVorbisSupported() { | ||
@@ -51,3 +60,19 @@ return isTypeSupported(VORBIS_CONTENT_TYPE); | ||
} | ||
function isDtsSupported() { | ||
return isTypeSupported(DTS_CORE_CONTENT_TYPE); | ||
} | ||
function isDtsHdSupported() { | ||
return isTypeSupported(DTS_HD_CORE_PLUS_EXTENSION_CONTENT_TYPE); | ||
} | ||
function isDtsExpressSupported() { | ||
return isTypeSupported(DTS_HD_LBR_CONTENT_TYPE); | ||
} | ||
function isDtsXSupported() { | ||
return isTypeSupported(DTS_UHD_PROFILE_2_CONTENT_TYPE); | ||
} | ||
const H264_BASELINE_CONTENT_TYPE = 'video/mp4; codecs="avc1.42E01E"'; | ||
const H264_MAIN_CONTENT_TYPE = 'video/mp4; codecs="avc1.4D401E"'; | ||
const H264_HIGH_CONTENT_TYPE = 'video/mp4; codecs="avc1.64001E"'; | ||
const FAIRPLAY_KEY_SYSTEM = 'com.apple.fps'; | ||
@@ -211,3 +236,3 @@ const FAIRPLAY_V1_KEY_SYSTEM = 'com.apple.fps.1_0'; | ||
} | ||
function isHDRScreenSupported() { | ||
function isHdrScreenSupported() { | ||
let result = false; | ||
@@ -337,2 +362,5 @@ try { | ||
const TTMPL_CONTENT_TYPE = 'application/ttml+xml'; | ||
const WEBVTT_CONTENT_TYPE = 'text/vtt'; | ||
function getGpuVendor() { | ||
@@ -381,2 +409,2 @@ const canvas = document.createElement('canvas'); | ||
export { AC3_CONTENT_TYPE, ACC_CONTENT_TYPE, CLEAR_KEY_SYSTEM, DOLBY_ATMOS_CONTENT_TYPE, EC3_CONTENT_TYPE, FAIRPLAY_KEY_SYSTEM, FAIRPLAY_V1_KEY_SYSTEM, FAIRPLAY_V2_KEY_SYSTEM, FAIRPLAY_V3_KEY_SYSTEM, FLAC_CONTENT_TYPE, H264_BASELINE_CONTENT_TYPE, H264_HIGH_CONTENT_TYPE, H264_MAIN_CONTENT_TYPE, MPEGH_AUDIO_CONTENT_TYPE, OPUS_CONTENT_TYPE, PLAYREADY_KEY_SYSTEM, PRIMETIME_KEY_SYSTEM, VORBIS_CONTENT_TYPE, WIDEWINE_KEY_SYSTEM, getDevicePixelRatio, getGpuRenderer, getGpuVendor, getScreenBadge, getScreenDepth, getScreenHeight, getScreenWidth, is10KScreenSupported, is16KScreenSupported, is2KScreenSupported, is2dot5KScreenSupported, is4KScreenSupported, is5KScreenSupported, is6KScreenSupported, is8KScreenSupported, isACCSupported, isClearKeySupported, isDolbyAtmosSupported, isDolbyDigitalPlusSupported, isDolbyDigitalSupported, isFairPlaySupported, isFlacSupported, isFullHDScreenSupported, isHDRScreenSupported, isHDScreenSupported, isMpegHAudioSupported, isOpusSupported, isPlayReadySL150Supported, isPlayReadySL2000Supported, isPlayReadySL3000Supported, isPlayReadySupported, isPrimetimeSupported, isSDScreenSupported, isTypeSupported, isVorbisSupported, isWidevineL1Supported, isWidevineL3Supported, isWidevineSupported }; | ||
export { ACC_CONTENT_TYPE, CLEAR_KEY_SYSTEM, DOLBY_AC3_CONTENT_TYPE, DOLBY_AC4_CONTENT_TYPE, DOLBY_ATMOS_CONTENT_TYPE, DOLBY_EC3_CONTENT_TYPE, DTS_CORE_CONTENT_TYPE, DTS_HD_CORE_PLUS_EXTENSION_CONTENT_TYPE, DTS_HD_LBR_CONTENT_TYPE, DTS_UHD_PROFILE_2_CONTENT_TYPE, DTS_UHD_PROFILE_3_CONTENT_TYPE, FAIRPLAY_KEY_SYSTEM, FAIRPLAY_V1_KEY_SYSTEM, FAIRPLAY_V2_KEY_SYSTEM, FAIRPLAY_V3_KEY_SYSTEM, FLAC_CONTENT_TYPE, H264_BASELINE_CONTENT_TYPE, H264_HIGH_CONTENT_TYPE, H264_MAIN_CONTENT_TYPE, MPEG_H_AUDIO_LC_PROFILE_LEVEL_1_CONTENT_TYPE, MPEG_H_AUDIO_LC_PROFILE_LEVEL_1_MULTISTREAM_CONTENT_TYPE, MPEG_H_AUDIO_LC_PROFILE_LEVEL_2_CONTENT_TYPE, MPEG_H_AUDIO_LC_PROFILE_LEVEL_2_MULTISTREAM_CONTENT_TYPE, MPEG_H_AUDIO_LC_PROFILE_LEVEL_3_CONTENT_TYPE, MPEG_H_AUDIO_LC_PROFILE_LEVEL_3_MULTISTREAM_CONTENT_TYPE, OPUS_CONTENT_TYPE, PLAYREADY_KEY_SYSTEM, PRIMETIME_KEY_SYSTEM, TTMPL_CONTENT_TYPE, VORBIS_CONTENT_TYPE, WEBVTT_CONTENT_TYPE, WIDEWINE_KEY_SYSTEM, XHE_AAC_CONTENT_TYPE, getDevicePixelRatio, getGpuRenderer, getGpuVendor, getScreenBadge, getScreenDepth, getScreenHeight, getScreenWidth, is10KScreenSupported, is16KScreenSupported, is2KScreenSupported, is2dot5KScreenSupported, is4KScreenSupported, is5KScreenSupported, is6KScreenSupported, is8KScreenSupported, isAccSupported, isClearKeySupported, isDolbyAtmosSupported, isDolbyDigitalPlusSupported, isDolbyDigitalSupported, isDtsExpressSupported, isDtsHdSupported, isDtsSupported, isDtsXSupported, isFairPlaySupported, isFlacSupported, isFullHDScreenSupported, isHDScreenSupported, isHdrScreenSupported, isMpegHAudioSupported, isOpusSupported, isPlayReadySL150Supported, isPlayReadySL2000Supported, isPlayReadySL3000Supported, isPlayReadySupported, isPrimetimeSupported, isSDScreenSupported, isTypeSupported, isVorbisSupported, isWidevineL1Supported, isWidevineL3Supported, isWidevineSupported }; |
@@ -5,3 +5,3 @@ export declare function getDevicePixelRatio(): number; | ||
export declare function getScreenDepth(): number; | ||
export declare function isHDRScreenSupported(): boolean; | ||
export declare function isHdrScreenSupported(): boolean; | ||
export declare function is16KScreenSupported(width?: number): boolean; | ||
@@ -8,0 +8,0 @@ export declare function is10KScreenSupported(width?: number): boolean; |
{ | ||
"name": "detect-audio-video", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Detect audio video features", | ||
@@ -5,0 +5,0 @@ "module": "dist/index.js", |
@@ -17,3 +17,3 @@ # detect-audio-video | ||
console.log(`ACC supported: ${isACCSupported()}`); | ||
console.log(`AAC supported: ${isAacSupported()}`); | ||
``` | ||
@@ -20,0 +20,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22403
21
489