Skip to content

Commit 94e20be

Browse files
authored
With mux video readme updates (vercel#13253)
* Add demo and note to with-mux-video * Update README.md
1 parent 32dece1 commit 94e20be

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

examples/with-mux-video/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This example uses Mux Video, an API-first platform for video. The example features video uploading and playback in a Next.js application.
44

5+
## Demo
6+
7+
### [https://with-mux-video.now.sh/](https://with-mux-video.now.sh/)
8+
59
## Deploy your own
610

711
Deploy the example using [Vercel](https://vercel.com/home):
@@ -18,6 +22,16 @@ npm init next-app --example with-mux-video with-mux-video-app
1822
yarn create next-app --example with-mux-video with-mux-video-app
1923
```
2024

25+
## Note
26+
27+
**Important:** When creating uploads, this demo sets `cors_origin: "*"` in the [`pages/api/upload.js`](pages/api/upload.js) file. For extra security, you should update this value to be something like `cors_origin: 'https://your-app.com'`, to restrict uploads to only be allowed from your application.
28+
29+
This example uses:
30+
31+
- [SWR](https://swr.now.sh/) — dynamically changing the `refreshInterval` depending on if the client should be polling for updates or not
32+
- [`/pages/api`](pages/api) routes — a couple endpoints for making authenticated requests to the Mux API.
33+
- Dynamic routes using [`getStaticPaths` and `fallback: true`](https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation), as well as dynamic API routes.
34+
2135
## Configuration
2236

2337
### Step 1. Create an account in Mux

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy