juanpicado / demo

Home Page:streamiodemo.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Frontend

  • React.js
  • Next.js
  • Typescript
  • SASS
  • Redux
  • Hls.js

API

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

Data Fetching

Static Site Generation

Overview pages like "Home", "TV" and "Movie" are being pre-rendered on build and revalidated every hour (page visit premised), hence are extremely performant and barely have any loading time.

Clientside

  1. Prefetch on hover using redux async thunk
  2. Url parameter with id on click to open popup
  3. Get state if available, if not yet, wait for updated state

Preview

HTTP Live Streaming

HTTP Live Streaming is an HTTP-based adaptive bitrate streaming communications protocol. It resembles MPEG-DASH in that it works by breaking the overall stream into a sequence of small HTTP-based file downloads, each downloading one short chunk of an overall potentially unbounded transport stream. A list of available streams, encoded at different bit rates, is sent to the client using an extended M3U playlist. Read more.

Custom Media Player

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

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.

About

streamiodemo.vercel.app


Languages

Language:TypeScript 70.7%Language:SCSS 28.5%Language:CSS 0.8%Language:JavaScript 0.1%