mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Workaround setting protocol on external player url (#4403)
This commit is contained in:
@@ -32,15 +32,21 @@ export const ExternalPlayerButton: React.FC<IExternalPlayerButtonProps> = ({
|
|||||||
streamURL.hash = `Intent;action=android.intent.action.VIEW;scheme=${scheme};type=video/mp4;S.title=${encodeURI(
|
streamURL.hash = `Intent;action=android.intent.action.VIEW;scheme=${scheme};type=video/mp4;S.title=${encodeURI(
|
||||||
title
|
title
|
||||||
)};end`;
|
)};end`;
|
||||||
streamURL.protocol = "intent";
|
|
||||||
url = streamURL.toString();
|
// #4401 - not allowed to set the protocol from a "special" protocol to a non-special protocol
|
||||||
|
url = streamURL
|
||||||
|
.toString()
|
||||||
|
.replace(new RegExp(`^${streamURL.protocol}`), "intent:");
|
||||||
} else if (isAppleDevice) {
|
} else if (isAppleDevice) {
|
||||||
streamURL.host = "x-callback-url";
|
streamURL.host = "x-callback-url";
|
||||||
streamURL.port = "";
|
streamURL.port = "";
|
||||||
streamURL.pathname = "stream";
|
streamURL.pathname = "stream";
|
||||||
streamURL.search = `url=${encodeURIComponent(stream)}`;
|
streamURL.search = `url=${encodeURIComponent(stream)}`;
|
||||||
streamURL.protocol = "vlc-x-callback";
|
|
||||||
url = streamURL.toString();
|
// #4401 - not allowed to set the protocol from a "special" protocol to a non-special protocol
|
||||||
|
url = streamURL
|
||||||
|
.toString()
|
||||||
|
.replace(new RegExp(`^${streamURL.protocol}`), "vlc-x-callback:");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user