Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/jwplayer/ott-web-app int…
Browse files Browse the repository at this point in the history
…o PS-290-new-payment-flow
  • Loading branch information
kiremitrov123 committed Sep 25, 2024
2 parents e9f56da + 0b3d607 commit ec61a8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 2 additions & 0 deletions packages/common/src/controllers/AccountController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export default class AccountController {

if (response) {
await this.accessController?.generateAccessTokens();
await this.getEntitledPlans();
await this.afterLogin(response.user, response.customerConsents);
return;
}
Expand Down Expand Up @@ -196,6 +197,7 @@ export default class AccountController {
if (response) {
const { user, customerConsents } = response;
await this.accessController?.generateAccessTokens();
await this.getEntitledPlans();
await this.afterLogin(user, customerConsents, true);

return;
Expand Down
8 changes: 1 addition & 7 deletions packages/hooks-react/src/useContentProtection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ const useContentProtection = <T>(
const { data: token, isLoading } = useQuery(
['token', type, id, params],
async () => {
if (isAccessBridgeEnabled) {
// if access control is set up we return nothing
// the useProtectedMedia hook will take care of it
return;
}

// if provider is not JWP
if (!!id && !!host) {
const accountController = getModule(AccountController);
Expand All @@ -56,7 +50,7 @@ const useContentProtection = <T>(
return jwpEntitlementService.getJWPMediaToken(configId, id);
}
},
{ enabled: (signingEnabled || isAccessBridgeEnabled) && enabled && !!id, keepPreviousData: false, staleTime: 15 * 60 * 1000 },
{ enabled: signingEnabled && enabled && !!id && !isAccessBridgeEnabled, keepPreviousData: false, staleTime: 15 * 60 * 1000 },
);

const queryResult = useQuery<T | undefined>([type, id, params, token], async () => callback(token, drmPolicyId), {
Expand Down
1 change: 0 additions & 1 deletion platforms/web/ini/.webapp.dev.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ defaultConfigSource = gnnuzabk
UNSAFE_allowAnyConfigSource = true
; Access Bridge service API url host
apiAccessBridgeUrl =

0 comments on commit ec61a8f

Please sign in to comment.