-
-
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
[BUG]: IOS DRM Custom License Request Not Working #4177
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version "react, while the latest stable version is native. Please update to the latest version and check if the issue still exists.
|
1 similar comment
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version "react, while the latest stable version is native. Please update to the latest version and check if the issue still exists.
|
@paulvictory It would be interesting for you to test following PR: #4136 Additionnally it's hard to test on our side as I guess access_token is expired |
unfortunatelly, I don't have ios device for now ... So I cannot test. maybe @KrzysztofMoch can have a try on his branch. |
Can confirm that DRM content is working on 6.4.5 but is NOT working on 6.5.0. Steps I took:
|
Thank you for your issue report. Please note that the following information is missing or incomplete:
Please update your issue with this information to help us address it more effectively.
There is a newer version of the library available. You are using version "react, while the latest stable version is native. Please update to the latest version and check if the issue still exists.
|
Version
"react-native-video": "^6.5.0"
What platforms are you having the problem on?
iOS
System Version
Mac mini M2
On what device are you experiencing the issue?
Real device, Simulator
Architecture
new architecture
What happened?
Video error: {
"error": {
"localizedRecoverySuggestion": "",
"code": 1718449215,
"domain": "CoreMediaErrorDomain",
"localizedDescription": "The operation couldn’t be completed. (CoreMediaErrorDomain error 1718449215.)",
"localizedFailureReason": ""
},
"target": 3
}
Reproduction
Step to reproduce this bug are:
import React, { useRef } from 'react';
import { View, Platform, Alert } from 'react-native';
import Video from 'react-native-video';
const VideoPlayer = () => {
const isIos = Platform.OS === 'ios';
const videoRef = useRef(null);
return (
<View style={{ flex: 1 }}>
<Video
ref={videoRef}
source={{
uri: isIos
? 'https://d2a1rntxelqk4o.cloudfront.net/transcoded/xxxxxxxxxxx/video.m3u8'
: 'https://d384padtbeqfgy.cloudfront.net/transcoded/xxxxxxxxxxx/video.mpd',
type: isIos ? 'm3u8' : 'mpd',
drm: {
type: 'fairplay',
certificateUrl:
https://app.tpstreams.com/static/fairplay.cer
,licenseServer: 'https://app.tpstreams.com/api/v1/xxxxxx/assets/xxxxxxxxxxx/drm_license/?access_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&drm_type=fairplay',
base64Certificate: true,
getLicense: async (spcBase64, contentId, licenseUrl) => {
return await fetch('https://app.tpstreams.com/api/v1/xxxxxx/assets/xxxxxxxxxxx/drm_license/?access_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&drm_type=fairplay', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
}).then(response => response.text()).then((response) => {
console.log(response);
return response;
}).catch((error) => {
console.error('Error', error);
});
}
);
};
export default VideoPlayer;
The text was updated successfully, but these errors were encountered: