Skip to content

Commit

Permalink
Update url formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
prajwalkulkarni committed Jul 1, 2024
1 parent b0ff5eb commit 15e020e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/MediaPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ const MediaPortal: React.FC<{
onClick: React.MouseEventHandler<HTMLDivElement>;
}> = (props) => {
const { mediaType, imdbID, season, episode } = props;
const embed = `${mediaType === "series" ? "tv" : "movie"}?id=${imdbID}${
mediaType === "series" ? "&s=" + props.season + "&e=" + props.episode : ""
}`;
const vidSrc = `/${
mediaType === "series" ? imdbID + "/" + season + "-" + episode : imdbID

const vidSrc = `${
mediaType === "series"
? "tv/" + imdbID + "/" + season + "/" + episode
: "movie/" + imdbID
}`;

return (
<div className="fixed top-0 left-0 z-10 flex items-center justify-center w-screen h-screen bg-black">
<div
Expand All @@ -26,7 +27,7 @@ const MediaPortal: React.FC<{

<div className="z-20 w-full md:w-4/5 md:h-3/4">
<iframe
src={`${process.env.REACT_APP_PLAYER_URL}/${vidSrc}/color-5b21b6`}
src={`${process.env.REACT_APP_PLAYER_URL}/${vidSrc}`}
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
Expand Down

0 comments on commit 15e020e

Please sign in to comment.