From 4e03197ac5e5410405a432c54df6153cfd697bdc Mon Sep 17 00:00:00 2001 From: kiremitrov123 Date: Tue, 28 Mar 2023 12:59:43 +0200 Subject: [PATCH] fix: use content protection tweaks --- src/hooks/useContentProtection.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hooks/useContentProtection.ts b/src/hooks/useContentProtection.ts index e20aecc8c..b6a740bd3 100644 --- a/src/hooks/useContentProtection.ts +++ b/src/hooks/useContentProtection.ts @@ -24,14 +24,13 @@ const useContentProtection = ( })); const host = signingConfig?.host; const drmPolicyId = contentProtection?.drm?.defaultPolicyId ?? signingConfig?.drmPolicyId; - const drmEnabled = !!drmPolicyId; const signingEnabled = !!urlSigning; const { data: token, isLoading } = useQuery( ['token', type, id, params], () => { // if provider is not JWP - if (!!id && !!host && drmEnabled) { + if (!!id && !!host && !!drmPolicyId) { const { host, drmPolicyId } = signingConfig; return getMediaToken(host, id, jwt, params, drmPolicyId); }