diff --git a/app/components/ReleasePlayer/ReleasePlayerCustom.tsx b/app/components/ReleasePlayer/ReleasePlayerCustom.tsx
index 65d3f6b..f5df7a1 100644
--- a/app/components/ReleasePlayer/ReleasePlayerCustom.tsx
+++ b/app/components/ReleasePlayer/ReleasePlayerCustom.tsx
@@ -33,6 +33,7 @@ export const ReleasePlayerCustom = (props: {
const [playerProps, SetPlayerProps] = useState({
src: null,
poster: null,
+ type: null,
useCustom: false,
});
@@ -146,6 +147,17 @@ export const ReleasePlayerCustom = (props: {
return { manifest, poster };
};
+ const _fetchSibnetManifest = async (url: string) => {
+ const response = await fetch(
+ `/api/proxy/${encodeURIComponent(url)}?isSibnet=true`
+ );
+ const data = await response.json();
+
+ let manifest = data.url;
+ let poster = data.poster;
+ return { manifest, poster };
+ };
+
useEffect(() => {
const __getInfo = async () => {
const vo = await _fetchVoiceover(props.id);
@@ -232,6 +244,7 @@ export const ReleasePlayerCustom = (props: {
src: manifest,
poster: poster,
useCustom: true,
+ type: "hls",
});
return;
}
@@ -243,6 +256,19 @@ export const ReleasePlayerCustom = (props: {
src: manifest,
poster: poster,
useCustom: true,
+ type: "hls",
+ });
+ return;
+ }
+ if (source.selected.name == "Sibnet") {
+ const { manifest, poster } = await _fetchSibnetManifest(
+ episode.selected.url
+ );
+ SetPlayerProps({
+ src: manifest,
+ poster: poster,
+ useCustom: true,
+ type: "mp4",
});
return;
}
@@ -250,6 +276,7 @@ export const ReleasePlayerCustom = (props: {
src: episode.selected.url,
poster: null,
useCustom: false,
+ type: null,
});
};
if (episode.selected) {
@@ -285,11 +312,18 @@ export const ReleasePlayerCustom = (props: {
{playerProps.useCustom ?
-
+ {playerProps.type == "hls" ?
+
+ :
+ }
: }