iOS DRM Fixes for License Fetching (#2208)

This commit is contained in:
Nick Fujita
2021-01-13 19:18:01 +09:00
committed by GitHub
parent faf8aed29b
commit 88b636f158
2 changed files with 38 additions and 12 deletions

View File

@@ -236,8 +236,8 @@ export default class Video extends Component {
_onGetLicense = (event) => {
if (this.props.drm && this.props.drm.getLicense instanceof Function) {
const data = event.nativeEvent;
if (data && data.spc) {
const getLicenseOverride = this.props.drm.getLicense(data.spc, data.contentId, data.spcBase64, this.props);
if (data && data.spcBase64) {
const getLicenseOverride = this.props.drm.getLicense(data.spcBase64, data.contentId, data.licenseUrl);
const getLicensePromise = Promise.resolve(getLicenseOverride); // Handles both scenarios, getLicenseOverride being a promise and not.
getLicensePromise.then((result => {
if (result !== undefined) {