diff --git a/Video.js b/Video.js index 0b64d4b5a2..a045c923dc 100644 --- a/Video.js +++ b/Video.js @@ -233,7 +233,7 @@ 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) { + if (data) { const getLicenseOverride = this.props.drm.getLicense(data.spc, data.contentId, data.spcBase64, this.props); const getLicensePromise = Promise.resolve(getLicenseOverride); // Handles both scenarios, getLicenseOverride being a promise and not. getLicensePromise.then((result => { diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index 7a9e0b625b..51d1ed3c9f 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -1737,7 +1737,7 @@ - (BOOL)loadingRequestHandling:(AVAssetResourceLoadingRequest *)loadingRequest { self->_requestingCertificate = YES; self.onGetLicense(@{@"spc": spcStr, @"contentId": contentId, - @"spcBase64": [[[NSData alloc] initWithBase64EncodedData:certificateData options:NSDataBase64DecodingIgnoreUnknownCharacters] base64EncodedStringWithOptions:0], + @"spcBase64": [spcData base64EncodedStringWithOptions:0], @"target": self.reactTag}); } else if(licenseServer != nil) { NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];