@@ -168,11 +168,11 @@ Self-hosting videos may be preferable for several reasons:
...
@@ -168,11 +168,11 @@ Self-hosting videos may be preferable for several reasons:
### Using Vercel Blob for video hosting
### Using Vercel Blob for video hosting
[Vercel Blob](https://vercel.com/docs/storage/vercel-blob) offers an efficient way to host videos, providing a scalable cloud storage solution that works well with Next.js. Here'showyoucanhostavideousingVercelBlob:
[Vercel Blob](https://vercel.com/docs/storage/vercel-blob?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) offers an efficient way to host videos, providing a scalable cloud storage solution that works well with Next.js. Here'showyoucanhostavideousingVercelBlob:
**1.UploadingavideotoVercelBlob**
**1.UploadingavideotoVercelBlob**
InyourVerceldashboard,navigatetothe"Storage"tabandselectyourVercelBlobdatabase.IntheBlobtable's upper-right corner, find and click the "Upload" button. Then, choose the video file you wish to upload. After the upload completes, the video file will appear in the Blob table.
InyourVerceldashboard,navigatetothe"Storage"tabandselectyour[VercelBlob](https://vercel.com/docs/storage/vercel-blob?utm_source=next-site&utm_medium=docs&utm_campaign=next-website)store.IntheBlobtable's upper-right corner, find and click the "Upload" button. Then, choose the video file you wish to upload. After the upload completes, the video file will appear in the Blob table.
Alternatively, you can upload your video using a server action. For detailed instructions, refer to the Vercel documentation on [server-side uploads](https://vercel.com/docs/storage/vercel-blob/server-upload). Vercel also supports [client-side uploads](https://vercel.com/docs/storage/vercel-blob/client-upload). This method may be preferable for certain use cases.
Alternatively, you can upload your video using a server action. For detailed instructions, refer to the Vercel documentation on [server-side uploads](https://vercel.com/docs/storage/vercel-blob/server-upload). Vercel also supports [client-side uploads](https://vercel.com/docs/storage/vercel-blob/client-upload). This method may be preferable for certain use cases.
...
@@ -212,7 +212,7 @@ In this approach, the page uses the video's `@vercel/blob` URL to display the vi
...
@@ -212,7 +212,7 @@ In this approach, the page uses the video's `@vercel/blob` URL to display the vi
### Adding subtitles to your video
### Adding subtitles to your video
If you have subtitles for your video, you can easily add them using the `<track>` element inside your `<video>` tag. You can fetch the subtitle file from Vercel Blob in a similar way as the video file. Here'showyoucanupdatethe`<VideoComponent>`toincludesubtitles.
If you have subtitles for your video, you can easily add them using the `<track>` element inside your `<video>` tag. You can fetch the subtitle file from [Vercel Blob](https://vercel.com/docs/storage/vercel-blob?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) in a similar way as the video file. Here'showyoucanupdatethe`<VideoComponent>`toincludesubtitles.
```jsx filename="app/page.jsx"
```jsx filename="app/page.jsx"
async function VideoComponent({ fileName }) {
async function VideoComponent({ fileName }) {
...
@@ -252,7 +252,7 @@ Explore these video streaming platforms for integrating video into your Next.js
...
@@ -252,7 +252,7 @@ Explore these video streaming platforms for integrating video into your Next.js
@@ -47,4 +47,4 @@ For static metadata files, such as `robots.txt`, `favicon.ico`, etc, you should
...
@@ -47,4 +47,4 @@ For static metadata files, such as `robots.txt`, `favicon.ico`, etc, you should
> Good to know:
> Good to know:
>
>
> - The directory must be named `public`. The name cannot be changed and it's the only directory used to serve static assets.
> - The directory must be named `public`. The name cannot be changed and it's the only directory used to serve static assets.
> - Only assets that are in the `public` directory at [build time](/docs/app/api-reference/next-cli#build) will be served by Next.js. Files added at request time won't be available. We recommend using a third-party service like [AWS S3](https://aws.amazon.com/s3/) for persistent file storage.
> - Only assets that are in the `public` directory at [build time](/docs/app/api-reference/next-cli#build) will be served by Next.js. Files added at request time won't be available. We recommend using a third-party service like [Vercel Blob](https://vercel.com/docs/storage/vercel-blob?utm_source=next-site&utm_medium=docs&utm_campaign=next-website) for persistent file storage.