fix(ios): split licenseUrl and loadedLicenseUrl (#3578)
* fix(ios): split licenseUrl and loadedLicenseUrl * fix(ios): fix drm license url used to provide the answer
This commit is contained in:
@@ -438,6 +438,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
data.spcBase64,
|
||||
data.contentId,
|
||||
data.licenseUrl,
|
||||
data.loadedLicenseUrl,
|
||||
);
|
||||
const getLicensePromise = Promise.resolve(getLicenseOverride); // Handles both scenarios, getLicenseOverride being a promise and not.
|
||||
getLicensePromise
|
||||
@@ -446,14 +447,14 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
nativeRef.current &&
|
||||
VideoManager.setLicenseResult(
|
||||
result,
|
||||
data.licenseUrl,
|
||||
data.loadedLicenseUrl,
|
||||
getReactTag(nativeRef),
|
||||
);
|
||||
} else {
|
||||
nativeRef.current &&
|
||||
VideoManager.setLicenseResultError(
|
||||
'Empty license result',
|
||||
data.licenseUrl,
|
||||
data.loadedLicenseUrl,
|
||||
getReactTag(nativeRef),
|
||||
);
|
||||
}
|
||||
@@ -462,14 +463,14 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
||||
nativeRef.current &&
|
||||
VideoManager.setLicenseResultError(
|
||||
'fetch error',
|
||||
data.licenseUrl,
|
||||
data.loadedLicenseUrl,
|
||||
getReactTag(nativeRef),
|
||||
);
|
||||
});
|
||||
} else {
|
||||
VideoManager.setLicenseResultError(
|
||||
'No spc received',
|
||||
data.licenseUrl,
|
||||
data.loadedLicenseUrl,
|
||||
getReactTag(nativeRef),
|
||||
);
|
||||
}
|
||||
|
@@ -243,6 +243,7 @@ export type OnExternalPlaybackChangeData = Readonly<{
|
||||
|
||||
export type OnGetLicenseData = Readonly<{
|
||||
licenseUrl: string;
|
||||
loadedLicenseUrl: string;
|
||||
contentId: string;
|
||||
spcBase64: string;
|
||||
}>;
|
||||
|
@@ -54,6 +54,7 @@ export type Drm = Readonly<{
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
getLicense?: (
|
||||
licenseUrl: string,
|
||||
loadedLicenseUrl: string,
|
||||
contentId: string,
|
||||
spcBase64: string,
|
||||
) => void; // ios
|
||||
|
Reference in New Issue
Block a user