detect-audio-video
Advanced tools
Comparing version 2.2.2 to 2.3.0
@@ -9,1 +9,3 @@ declare global { | ||
export declare function isMmsSupported(): boolean; | ||
export declare function isMseInWorkersSupported(): boolean; | ||
export declare function isMmsInWorkersSupported(): boolean; |
@@ -330,3 +330,3 @@ const AAC_CONTENT_TYPE = 'audio/mp4; codecs="mp4a.40.2"'; | ||
function isMseSupported() { | ||
return Boolean(typeof window !== 'undefined' && | ||
return Boolean(!isSsr && | ||
window.MediaSource && | ||
@@ -337,3 +337,3 @@ typeof window.MediaSource.isTypeSupported === 'function'); | ||
var _a, _b; | ||
return Boolean(typeof window !== 'undefined' && | ||
return Boolean(!isSsr && | ||
window.MediaKeys && | ||
@@ -346,6 +346,12 @@ ( | ||
function isMmsSupported() { | ||
return Boolean(typeof window !== 'undefined' && | ||
return Boolean(!isSsr && | ||
window.ManagedMediaSource && | ||
typeof window.ManagedMediaSource.isTypeSupported === 'function'); | ||
} | ||
function isMseInWorkersSupported() { | ||
return Boolean(isMseSupported() && window.MediaSource.canConstructInDedicatedWorker); | ||
} | ||
function isMmsInWorkersSupported() { | ||
return Boolean(isMmsSupported() && window.ManagedMediaSource.canConstructInDedicatedWorker); | ||
} | ||
@@ -768,2 +774,10 @@ function getDevicePixelRatio() { | ||
function isRemotePlaybackApiSupported() { | ||
var _a; | ||
if (isSsr) { | ||
return false; | ||
} | ||
const video = document.createElement('video'); | ||
return Boolean((_a = video.remote) === null || _a === void 0 ? void 0 : _a.watchAvailability); | ||
} | ||
function isPipSupported() { | ||
@@ -802,2 +816,2 @@ if (isSsr) { | ||
export { AAC_CONTENT_TYPE, ALAC_CONTENT_TYPE, APNG_CONTENT_TYPE, AV1_CONTENT_TYPE, AV1_MAIN10_CONTENT_TYPE, AVIF_CONTENT_TYPE, CLEAR_KEY_SYSTEM, DOLBY_AC3_CONTENT_TYPE, DOLBY_AC4_CONTENT_TYPE, DOLBY_ATMOS_CONTENT_TYPE, DOLBY_EC3_CONTENT_TYPE, DOLBY_VISION_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, EVC_BASELINE_CONTENT_TYPE, EVC_MAIN_CONTENT_TYPE, FAIRPLAY_KEY_SYSTEM, FAIRPLAY_V1_KEY_SYSTEM, FAIRPLAY_V2_KEY_SYSTEM, FAIRPLAY_V3_KEY_SYSTEM, FLAC_CONTENT_TYPE, GIF_CONTENT_TYPE, H264_BASELINE_CONTENT_TYPE, H264_HIGH_CONTENT_TYPE, H264_MAIN_CONTENT_TYPE, HEIC_CONTENT_TYPE, HEIF_CONTENT_TYPE, HEV_MAIN10_CONTENT_TYPE, HEV_MAIN_CONTENT_TYPE, HLS_CONTENT_TYPE, HVC_MAIN10_CONTENT_TYPE, HVC_MAIN_CONTENT_TYPE, JPEG_CONTENT_TYPE, JPEG_XL_CONTENT_TYPE, MP3_CONTENT_TYPE, MP4_AUDIO_CONTENT_TYPE, MPD_CONTENT_TYPE, MPEG2T_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, MSS_CONTENT_TYPE, OPUS_CONTENT_TYPE, PLAYREADY_KEY_SYSTEM, PLAYREADY_RECOMMENDATION_KEY_SYSTEM, PNG_CONTENT_TYPE, PRIMETIME_KEY_SYSTEM, SVG_CONTENT_TYPE, TTML_CONTENT_TYPE, VORBIS_CONTENT_TYPE, VP8_CONTENT_TYPE, VP9_CONTENT_TYPE, VP9_PROFILE2_LEVEL1_10BIT_CONTENT_TYPE, VVC1_MAIN10_CONTENT_TYPE, VVCI_MAIN10_CONTENT_TYPE, WEBP_CONTENT_TYPE, WEBVTT_CONTENT_TYPE, WIDEWINE_KEY_SYSTEM, XHE_AAC_CONTENT_TYPE, canPlayType, checkSize, defaultAudioCapabilites, defaultAudioElement, defaultVideoCapabilites, defaultVideoElement, encryptionSchemes, getDefaultAudioElement, getDefaultVideoElement, getDevicePixelRatio, getFirefoxVersion, getGpuRenderer, getGpuVendor, getResolutionBadge, getScreenDepth, getScreenHeight, getScreenWidth, hasHardwareAcceleration, initDataTypes, is10KScreenSupported, is16KScreenSupported, is2KScreenSupported, is2dot5KScreenSupported, is32KScreenSupported, is3KScreenSupported, is4KScreenSupported, is5KScreenSupported, is6KScreenSupported, is8KScreenSupported, isAPngSupported, isAV1Main10Supported, isAV1Supported, isAacSupported, isAlacSupported, isAppleSilicon, isAvifSupported, isCastToAirPlaySupported, isChromium, isClearKeySupported, isContentTypeSupported, isDocumentPipSupported, isDolbyAtmosSupported, isDolbyDigitalPlusSupported, isDolbyDigitalSupported, isDolbyVisionSupported, isDtsExpressSupported, isDtsHdSupported, isDtsSupported, isDtsXSupported, isEmeSupported, isEvcBaselineSupported, isEvcMainSupported, isFairPlaySupported, isFairPlayV1Supported, isFairPlayV2Supported, isFairPlayV3Supported, isFirefox, isFlacSupported, isFullHDScreenSupported, isGifSupported, isH264BaselineSupported, isH264HighSupported, isH264MainSupported, isHDScreenSupported, isHeicSupported, isHeifSupported, isHevcMain10Supported, isHevcMainSupported, isHighDynamicRangeSupported, isHighVideoDynamicRangeSupported, isImageSupported, isJpegSupported, isJpegXlSupported, isMmsSupported, isMobile, isMoreOrEqual, isMp3Supported, isMp4AudioSupported, isMpeg2TSupported, isMpegHAudioSupported, isMseSupported, isNativeHlsSupported, isNativeMpdSupported, isNativeMssSupported, isOpusSupported, isP3Supported, isPipSupported, isPlayReadySL150Supported, isPlayReadySL2000Supported, isPlayReadySL3000Supported, isPlayReadySupported, isPngSupported, isPrimetimeSupported, isRec2020Supported, isSDScreenSupported, isSrgbSupported, isStandalone, isSvgSupported, isTypeSupported, isVorbisSupported, isVp8Supported, isVp9Profile2Level110BitSupported, isVp9Supported, isVvcMain10Supported, isWebpSupported, isWideGamutSupported, isWidevineL1Supported, isWidevineL3Supported, isWidevineSupported, resetDefaultMediaElements }; | ||
export { AAC_CONTENT_TYPE, ALAC_CONTENT_TYPE, APNG_CONTENT_TYPE, AV1_CONTENT_TYPE, AV1_MAIN10_CONTENT_TYPE, AVIF_CONTENT_TYPE, CLEAR_KEY_SYSTEM, DOLBY_AC3_CONTENT_TYPE, DOLBY_AC4_CONTENT_TYPE, DOLBY_ATMOS_CONTENT_TYPE, DOLBY_EC3_CONTENT_TYPE, DOLBY_VISION_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, EVC_BASELINE_CONTENT_TYPE, EVC_MAIN_CONTENT_TYPE, FAIRPLAY_KEY_SYSTEM, FAIRPLAY_V1_KEY_SYSTEM, FAIRPLAY_V2_KEY_SYSTEM, FAIRPLAY_V3_KEY_SYSTEM, FLAC_CONTENT_TYPE, GIF_CONTENT_TYPE, H264_BASELINE_CONTENT_TYPE, H264_HIGH_CONTENT_TYPE, H264_MAIN_CONTENT_TYPE, HEIC_CONTENT_TYPE, HEIF_CONTENT_TYPE, HEV_MAIN10_CONTENT_TYPE, HEV_MAIN_CONTENT_TYPE, HLS_CONTENT_TYPE, HVC_MAIN10_CONTENT_TYPE, HVC_MAIN_CONTENT_TYPE, JPEG_CONTENT_TYPE, JPEG_XL_CONTENT_TYPE, MP3_CONTENT_TYPE, MP4_AUDIO_CONTENT_TYPE, MPD_CONTENT_TYPE, MPEG2T_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, MSS_CONTENT_TYPE, OPUS_CONTENT_TYPE, PLAYREADY_KEY_SYSTEM, PLAYREADY_RECOMMENDATION_KEY_SYSTEM, PNG_CONTENT_TYPE, PRIMETIME_KEY_SYSTEM, SVG_CONTENT_TYPE, TTML_CONTENT_TYPE, VORBIS_CONTENT_TYPE, VP8_CONTENT_TYPE, VP9_CONTENT_TYPE, VP9_PROFILE2_LEVEL1_10BIT_CONTENT_TYPE, VVC1_MAIN10_CONTENT_TYPE, VVCI_MAIN10_CONTENT_TYPE, WEBP_CONTENT_TYPE, WEBVTT_CONTENT_TYPE, WIDEWINE_KEY_SYSTEM, XHE_AAC_CONTENT_TYPE, canPlayType, checkSize, defaultAudioCapabilites, defaultAudioElement, defaultVideoCapabilites, defaultVideoElement, encryptionSchemes, getDefaultAudioElement, getDefaultVideoElement, getDevicePixelRatio, getFirefoxVersion, getGpuRenderer, getGpuVendor, getResolutionBadge, getScreenDepth, getScreenHeight, getScreenWidth, hasHardwareAcceleration, initDataTypes, is10KScreenSupported, is16KScreenSupported, is2KScreenSupported, is2dot5KScreenSupported, is32KScreenSupported, is3KScreenSupported, is4KScreenSupported, is5KScreenSupported, is6KScreenSupported, is8KScreenSupported, isAPngSupported, isAV1Main10Supported, isAV1Supported, isAacSupported, isAlacSupported, isAppleSilicon, isAvifSupported, isCastToAirPlaySupported, isChromium, isClearKeySupported, isContentTypeSupported, isDocumentPipSupported, isDolbyAtmosSupported, isDolbyDigitalPlusSupported, isDolbyDigitalSupported, isDolbyVisionSupported, isDtsExpressSupported, isDtsHdSupported, isDtsSupported, isDtsXSupported, isEmeSupported, isEvcBaselineSupported, isEvcMainSupported, isFairPlaySupported, isFairPlayV1Supported, isFairPlayV2Supported, isFairPlayV3Supported, isFirefox, isFlacSupported, isFullHDScreenSupported, isGifSupported, isH264BaselineSupported, isH264HighSupported, isH264MainSupported, isHDScreenSupported, isHeicSupported, isHeifSupported, isHevcMain10Supported, isHevcMainSupported, isHighDynamicRangeSupported, isHighVideoDynamicRangeSupported, isImageSupported, isJpegSupported, isJpegXlSupported, isMmsInWorkersSupported, isMmsSupported, isMobile, isMoreOrEqual, isMp3Supported, isMp4AudioSupported, isMpeg2TSupported, isMpegHAudioSupported, isMseInWorkersSupported, isMseSupported, isNativeHlsSupported, isNativeMpdSupported, isNativeMssSupported, isOpusSupported, isP3Supported, isPipSupported, isPlayReadySL150Supported, isPlayReadySL2000Supported, isPlayReadySL3000Supported, isPlayReadySupported, isPngSupported, isPrimetimeSupported, isRec2020Supported, isRemotePlaybackApiSupported, isSDScreenSupported, isSrgbSupported, isStandalone, isSvgSupported, isTypeSupported, isVorbisSupported, isVp8Supported, isVp9Profile2Level110BitSupported, isVp9Supported, isVvcMain10Supported, isWebpSupported, isWideGamutSupported, isWidevineL1Supported, isWidevineL3Supported, isWidevineSupported, resetDefaultMediaElements }; |
@@ -0,3 +1,4 @@ | ||
export declare function isRemotePlaybackApiSupported(): boolean; | ||
export declare function isPipSupported(): boolean; | ||
export declare function isDocumentPipSupported(): boolean; | ||
export declare function isCastToAirPlaySupported(): boolean; |
{ | ||
"name": "detect-audio-video", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"description": "Detect audio and video features in browser", | ||
@@ -27,12 +27,12 @@ "module": "dist/index.js", | ||
"devDependencies": { | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/jest": "^29.5.12", | ||
"del-cli": "^5.1.0", | ||
"@rollup/plugin-node-resolve": "^15.3.0", | ||
"@rollup/plugin-typescript": "^12.1.0", | ||
"@types/jest": "^29.5.13", | ||
"del-cli": "^6.0.0", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"rollup": "^4.21.1", | ||
"ts-jest": "^29.2.3", | ||
"rollup": "^4.24.0", | ||
"ts-jest": "^29.2.5", | ||
"tslib": "^2.7.0", | ||
"typescript": "^5.5.4" | ||
"typescript": "^5.6.3" | ||
}, | ||
@@ -39,0 +39,0 @@ "keywords": [ |
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
55109
1247