Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
e98e79f3
Unverified
Commit
e98e79f3
authored
May 23, 2024
by
tokkiyaa
Committed by
GitHub
May 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: add missing / (#66105)
Co-authored-by:
Sam Ko
<
sam@vercel.com
>
parent
24180bda
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
02-videos.mdx
.../01-building-your-application/06-optimizing/02-videos.mdx
+8
-12
No files found.
docs/02-app/01-building-your-application/06-optimizing/02-videos.mdx
View file @
e98e79f3
...
@@ -216,25 +216,21 @@ If you have subtitles for your video, you can easily add them using the `<track>
...
@@ -216,25 +216,21 @@ If you have subtitles for your video, you can easily add them using the `<track>
```jsx filename="app/page.jsx"
```jsx filename="app/page.jsx"
async function VideoComponent({ fileName }) {
async function VideoComponent({ fileName }) {
const {
blobs
} = await list({
const {
blobs
} = await list({
prefix: fileName,
prefix: fileName,
limit: 2
limit: 2
,
})
;
})
const { url } = blobs[0]
;
const { url } = blobs[0]
const { url: captionsUrl } = blobs[1]
;
const { url: captionsUrl } = blobs[1]
return (
return (
<video controls preload="none" aria-label="Video player">
<video controls preload="none" aria-label="Video player">
<source src={url} type="video/mp4" />
<source src={url} type="video/mp4" />
<track
<track src={captionsUrl} kind="subtitles" srcLang="en" label="English" />
src={captionsUrl}
kind="subtitles"
srcLang="en"
label="English">
Your browser does not support the video tag.
Your browser does not support the video tag.
</video>
</video>
)
;
)
}
;
}
```
```
By
following
this
approach
,
you
can
effectively
self
-
host
and
integrate
videos
into
your
Next
.
js
applications
.
By
following
this
approach
,
you
can
effectively
self
-
host
and
integrate
videos
into
your
Next
.
js
applications
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment