-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drm Video not played:"The operation couldn’t be completed" #3417
Comments
Is it the same issue than: #3406 ? |
i dont think it is same issue,i got this error info { |
I also have the same problem. How should I solve it? |
@freeboub any update? |
We're experiencing the same issue. For whatever reason 6.0.0-alpha.8 works no problem. Upgrading to beta introduces this issue |
Hello, we faced the same problem with some of our content. We found that the problem happens in the line 156 of RCTResourceLoaderDelegate:
When the onGetLicense function calls setLicenseResult, it passes the licenseServer url. So, it searches in the loadingRequests dictionary with that key:
But the real key is "loadingRequest.request.url?.absoluteString". We managed to make it work by deleting
or by not passing licenseServer in DRM config at react component level. We introduced this bug on this PR: #3261 |
I investigated this issue also this week and came to the same conclusion. I think we just need to apply this patch, I will open a pr for that ! |
finally done here: #3578 |
Hello @freeboub, I tested the solution and to make it work I had to change Video.tsx from this: if (data && data.spcBase64) {
const getLicenseOverride = drm.getLicense(
data.spcBase64,
data.contentId,
data.licenseUrl,
data.loadedLicenseUrl,
);
const getLicensePromise = Promise.resolve(getLicenseOverride); // Handles both scenarios, getLicenseOverride being a promise and not.
getLicensePromise
.then((result) => {
if (result !== undefined) {
nativeRef.current &&
VideoManager.setLicenseResult(
result,
data.licenseUrl,
getReactTag(nativeRef),
);
} else {
nativeRef.current &&
VideoManager.setLicenseResultError(
'Empty license result',
data.licenseUrl,
getReactTag(nativeRef),
);
}
})
.catch(() => {
nativeRef.current &&
VideoManager.setLicenseResultError(
'fetch error',
data.licenseUrl,
getReactTag(nativeRef),
);
});
} else {
VideoManager.setLicenseResultError(
'No spc received',
data.licenseUrl,
getReactTag(nativeRef),
);
} to this: if (data && data.spcBase64) {
const getLicenseOverride = drm.getLicense(
data.spcBase64,
data.contentId,
data.licenseUrl,
data.loadedLicenseUrl,
);
const getLicensePromise = Promise.resolve(getLicenseOverride); // Handles both scenarios, getLicenseOverride being a promise and not.
getLicensePromise
.then((result) => {
if (result !== undefined) {
nativeRef.current &&
VideoManager.setLicenseResult(
result,
data.loadedLicenseUrl,
getReactTag(nativeRef),
);
} else {
nativeRef.current &&
VideoManager.setLicenseResultError(
'Empty license result',
data.loadedLicenseUrl,
getReactTag(nativeRef),
);
}
})
.catch(() => {
nativeRef.current &&
VideoManager.setLicenseResultError(
'fetch error',
data.loadedLicenseUrl,
getReactTag(nativeRef),
);
});
} else {
VideoManager.setLicenseResultError(
'No spc received',
data.loadedLicenseUrl,
getReactTag(nativeRef),
);
} Because it was still passing the licenseUrl as the key for searching in the loadingRequests dictionary. |
@facugu1998 Thank you for the quick feedback, I have updated the PR by changing licenseUrl to loadedLicenseUrl in setLicenseResultError and setLicenseResult calls. |
@freeboub Perfect! I tested it with our content, and it's working right. |
pull request merged to master, will be available in beta.6 |
@facugu1998 Could you please share the code snippet? I am also facing the same issue but not able to get a working solution. |
Platform
Which player are you experiencing the problem on:
Environment info
Library version: 6.0.0-beta.2
Device: iphone 12
IOS 17.1.2
Steps To Reproduce
getLicense returned successfully,but i got error
{"error": {"code": 1718449215, "domain": "CoreMediaErrorDomain", "localizedDescription": "The operation couldn’t be completed. (CoreMediaErrorDomain error 1718449215.)", "localizedFailureReason": "", "localizedRecoverySuggestion": ""}, "target": 28459}
video type is m3u8
The text was updated successfully, but these errors were encountered: