Code Monkey home page Code Monkey logo

streaming-platform's Introduction

A video streaming demo platform built with Next.js, inspired by Netflix, using a custom video player and providing a streaming example following the HLS protocol.

https://streaming-platform-tmdb.vercel.app/

Preview

Frontend

  • React.js
  • Next.js
  • Typescript
  • Styled Components
  • Redux
  • Hls.js

Image optimization is disabled due to Fair Use Policy.

Known issues

  1. Player isn't properly reset - Solution: Move player store to watch route

API

The following api is being utilized: https://developers.themoviedb.org/3/getting-started/introduction

Next.js

Middleware & Edge Functions

Whether or not a profile has been selected is being checked on the edge at the speed of static to handle a possible redirect.

Custom Media Player

The application uses its own custom media player. Because of missing resources audio and subtitle selection are not included.

Media Player

Getting Started

Make sure to copy paste the .env.public contents to your local dotenv file and fill in the missing fields.

Then, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

streaming-platform's People

Contributors

timfuhrmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

streaming-platform's Issues

Help: Errors when building the project

I cloned the repo and tried to run it, but I am having some package resolution and type errors.

Import trace for requested module:
./src/layout/profile/ProfileOverview/ProfileOverviewItem.tsx
./src/layout/profile/ProfileOverview/ProfileOverview.tsx
./src/pages/profile/index.tsx
 ⨯ ./src/lib/image.tsx:7:0
Module not found: Can't resolve 'csstype'
   5 | import { default as NextImage, ImageProps as NextImageProps } from "next/image";
   6 | import { tmdbConfig } from "./api/tmdb/config";
>  7 | import { Property } from "csstype";
   8 |
   9 | const fillImage = css`
  10 |     object-fit: cover;

Analyze results:

➜ npm run analyze

> [email protected] analyze
> ANALYZE=true next build


./src/layout/global/Popover/PopoverProvider.tsx
40:8  Warning: React Hook useEffect has missing dependencies: 'dispatch' and 'fetchRequests'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./src/layout/player/PlayerControlsProgress.tsx
103:8  Warning: React Hook useEffect has a missing dependency: 'jumpToAbs'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
108:8  Warning: React Hook useEffect has a missing dependency: 'moveIndicator'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./src/layout/player/PlayerProvider.tsx
90:8  Warning: React Hook useEffect has missing dependencies: 'addProgressToWatchlist', 'dispatch', 'hasShowProgress', and 'show'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
112:8  Warning: React Hook useEffect has missing dependencies: 'addProgressToWatchlist' and 'show'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./src/layout/profile/ProfileCode/ProfileCode.tsx
46:8  Warning: React Hook useEffect has a missing dependency: 'onChange'. Either include it or remove the dependency array. If 'onChange' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./src/layout/season/SeasonsOverview/SeasonOverviewProvider.tsx
34:8  Warning: React Hook useEffect has missing dependencies: 'dispatch', 'seasons', and 'show.id'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./src/lib/context/nprogress/NProgressProvider.tsx
17:8  Warning: React Hook useEffect has a missing dependency: 'router.events'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./src/lib/hook/useSearch.ts
28:25  Warning: React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead.  react-hooks/exhaustive-deps

./src/lib/hook/useSlider.ts
48:8  Warning: React Hook useEffect has missing dependencies: 'MutationPlugin' and 'options'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
   Linting and checking validity of types  .Failed to compile.

./src/layout/global/Popover/PopoverProvider.tsx:77:18
Type error: Type 'T' is not assignable to type 'IntrinsicAttributes & T'.
  Type 'T' is not assignable to type 'IntrinsicAttributes'.

  75 |         return (
  76 |             <PopoverProvider {...props}>
> 77 |                 <WrappedComponent {...props} />
     |                  ^
  78 |             </PopoverProvider>
  79 |         );
  80 |     };

Environment:

➜ node -v
v20.10.0

➜ npm ls  
[email protected] /Users/wkj/code/spikes/streaming-platform
├── @becklyn/[email protected]
├── @playwright/[email protected]
├── @reduxjs/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.