test
This commit is contained in:
parent
6aeb4d56b7
commit
2d3ece7dc4
3 changed files with 7 additions and 20 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 15c75c938cf89956b87b0404c8cfc04dbc5311f9
|
Subproject commit ff60b52232d79636656476b4057bbd7b479cd6c7
|
||||||
|
|
@ -1241,26 +1241,13 @@ const AndroidVideoPlayer: React.FC = () => {
|
||||||
ref={videoRef}
|
ref={videoRef}
|
||||||
style={[styles.video, customVideoStyles, { transform: [{ scale: zoomScale }] }]}
|
style={[styles.video, customVideoStyles, { transform: [{ scale: zoomScale }] }]}
|
||||||
source={(() => {
|
source={(() => {
|
||||||
// Use headers from route params if available, otherwise no headers
|
// FORCEFULLY use headers from route params if available - no filtering or modification
|
||||||
let processedHeaders = headers;
|
const sourceWithHeaders = headers ? {
|
||||||
|
|
||||||
// For iOS and Xprime streams, filter out potentially problematic headers
|
|
||||||
if (Platform.OS === 'ios' && headers && (streamProvider === 'xprime' || streamProvider === 'Xprime')) {
|
|
||||||
// Remove headers that might cause AVFoundation issues
|
|
||||||
const { 'Sec-Fetch-Dest': _, 'Sec-Fetch-Mode': __, 'Sec-Fetch-Site': ___, 'DNT': ____, ...filteredHeaders } = headers;
|
|
||||||
processedHeaders = {
|
|
||||||
'User-Agent': headers['User-Agent'] || 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15',
|
|
||||||
'Referer': headers['Referer'] || headers['Origin'] || 'https://xprime.tv/',
|
|
||||||
'Accept': 'video/mp4,video/*;q=0.9,*/*;q=0.8'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const sourceWithHeaders = processedHeaders ? {
|
|
||||||
uri: currentStreamUrl,
|
uri: currentStreamUrl,
|
||||||
headers: processedHeaders
|
headers: headers
|
||||||
} : { uri: currentStreamUrl };
|
} : { uri: currentStreamUrl };
|
||||||
|
|
||||||
console.log('[AndroidVideoPlayer] Using headers from route params:', processedHeaders);
|
console.log('[AndroidVideoPlayer] FORCEFULLY using headers from route params:', headers);
|
||||||
|
|
||||||
return sourceWithHeaders;
|
return sourceWithHeaders;
|
||||||
})()}
|
})()}
|
||||||
|
|
|
||||||
|
|
@ -1264,13 +1264,13 @@ const VideoPlayer: React.FC = () => {
|
||||||
ref={vlcRef}
|
ref={vlcRef}
|
||||||
style={[styles.video, customVideoStyles, { transform: [{ scale: zoomScale }] }]}
|
style={[styles.video, customVideoStyles, { transform: [{ scale: zoomScale }] }]}
|
||||||
source={(() => {
|
source={(() => {
|
||||||
// Use headers from route params if available, otherwise no headers
|
// FORCEFULLY use headers from route params if available - no filtering or modification
|
||||||
const sourceWithHeaders = headers ? {
|
const sourceWithHeaders = headers ? {
|
||||||
uri: currentStreamUrl,
|
uri: currentStreamUrl,
|
||||||
headers: headers
|
headers: headers
|
||||||
} : { uri: currentStreamUrl };
|
} : { uri: currentStreamUrl };
|
||||||
|
|
||||||
console.log('[VideoPlayer] Using headers from route params:', headers);
|
console.log('[VideoPlayer] FORCEFULLY using headers from route params:', headers);
|
||||||
|
|
||||||
return sourceWithHeaders;
|
return sourceWithHeaders;
|
||||||
})()}
|
})()}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue