rsnext/examples/with-apivideo/README.md
Yohann MARTZOLFF 8ad018fb35
Example/with apivideo (#45272)
### Documentation / Examples
Hello Next.js 👋🏼

This PR aims to update the with-apivideo example by:
- Updating images domain name
- Switch to `export default function` for pages
- Updating the uploader playable and ingested status

### What do we use
In this example, we use several Next.js features:
- Routes and dynamic routes
- API and dynamic API routes

And api.video tools:
- NodeJS client
- React player (instead of our Player SDK)
- TypeScript uploader

Thank's in advance for your review 🙏🏼
2023-02-02 13:44:37 +00:00

2.3 KiB

api.video video uploader

This video uploader and playback app is built with Next.js and api.video, the video first API.

Demo

https://with-apivideo.vercel.app/videos

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example with-apivideo
yarn create next-app --example with-apivideo
pnpm create next-app --example with-apivideo

Deploy it to the cloud with Vercel (Documentation).

Getting started

1. Create an api.video free account

  1. Go to dashboard.api.video, log in or create a free account.
  2. You can choose to stay in sandbox and have watermark over your videos, or enter in production mode and take advantage of all the features without limitations.

2. Get you API key

  1. Once in the dashboard, find your API keys directly in the /overview or navigate to /apikeys with the "API Keys" button in the side navigation.
  2. Copy your API key, and paste it in .env.local.example as value for API_KEY.
  3. Rename .env.local.example to .env.local.
  4. Install the packages by running npm install, yarn install or pnpm install.
  5. You can now try the application locally by running npm run dev, yarn dev or pnpm dev from the root directory.

3. Deployment

  1. First, push your app to GitHub/GitLab or Bitbucket
  2. Then, go to Vercel and import your new repository.
  3. Add an environment variable with name API_KEY and your API key for value.
  4. Click on deploy 🎉