diff --git a/site/src/components/installation/HTMLUsageCodeBlock.tsx b/site/src/components/installation/HTMLUsageCodeBlock.tsx
index a3bf67bc..184e185e 100644
--- a/site/src/components/installation/HTMLUsageCodeBlock.tsx
+++ b/site/src/components/installation/HTMLUsageCodeBlock.tsx
@@ -15,7 +15,6 @@ function getRendererTag(renderer: Renderer): string {
mux: 'mux-video',
shaka: 'shaka-video',
spotify: 'spotify-audio',
- videojs: 'videojs-video',
vimeo: 'vimeo-video',
wistia: 'wistia-video',
youtube: 'youtube-video',
@@ -25,15 +24,17 @@ function getRendererTag(renderer: Renderer): string {
function getProviderTag(useCase: UseCase): string {
const map: Record = {
- website: 'website-player-provider',
- 'background-video': 'background-video-player-provider',
+ 'default-video': 'video-player',
+ 'default-audio': 'audio-player',
+ 'background-video': 'background-video-player',
};
return map[useCase];
}
function getSkinTag(skin: Skin): string {
const map: Record = {
- frosted: 'frosted-video-skin',
+ 'default-video': 'video-skin',
+ 'default-audio': 'audio-skin',
minimal: 'minimal-video-skin',
};
return map[skin];
@@ -89,19 +90,27 @@ export default function HTMLUsageCodeBlock() {
const $muxPlaybackId = useStore(muxPlaybackId);
return (
-
-
-
- HTML
-
- JavaScript
-
-
-
-
-
-
-
-
+ <>
+
+
+
+ JavaScript
+
+
+
+
+
+
+
+
+
+ HTML
+
+
+
+
+
+
+ >
);
}
diff --git a/site/src/components/installation/ReactCreateCodeBlock.tsx b/site/src/components/installation/ReactCreateCodeBlock.tsx
index bcde6720..2987e592 100644
--- a/site/src/components/installation/ReactCreateCodeBlock.tsx
+++ b/site/src/components/installation/ReactCreateCodeBlock.tsx
@@ -24,14 +24,15 @@ function getRendererComponent(renderer: Renderer): string {
function getSkinComponent(skin: Skin): string {
const map: Record = {
- frosted: 'FrostedVideoSkin',
+ 'default-video': 'VideoSkin',
+ 'default-audio': 'AudioSkin',
minimal: 'MinimalVideoSkin',
};
return map[skin];
}
function getPresetAccess(useCase: UseCase): string {
- if (useCase === 'website') {
+ if (useCase === 'default-video') {
return 'presets.website';
}
return `presets['${useCase}']`;
@@ -52,8 +53,7 @@ function generateReactCode(useCase: UseCase, skin: Skin, renderer: Renderer, pla
? `<${rendererComponent} playbackId={playbackId} />`
: `<${rendererComponent} src={src} />`;
- return `// [your project] ./components/player/index.tsx
-import { createPlayer, presets, ${rendererComponent} } from '@videojs/react';
+ return `import { createPlayer, presets, ${rendererComponent} } from '@videojs/react';
import { ${skinComponent} } from '@videojs/react/presets/${useCase}';
import '@videojs/react/presets/${useCase}/skins/${skin}.css';
@@ -92,7 +92,7 @@ export default function ReactCreateCodeBlock() {
- React
+ ./components/player/index.tsx
diff --git a/site/src/components/installation/ReactUsageCodeBlock.tsx b/site/src/components/installation/ReactUsageCodeBlock.tsx
index 676c18db..004b62f9 100644
--- a/site/src/components/installation/ReactUsageCodeBlock.tsx
+++ b/site/src/components/installation/ReactUsageCodeBlock.tsx
@@ -8,8 +8,7 @@ function generateUsageCode(renderer: Renderer, playbackId: string | null): strin
const isMuxWithPlaybackId = renderer === 'mux' && playbackId;
const playerProp = isMuxWithPlaybackId ? `playbackId="${playbackId}"` : 'src="https://example.com/video.mp4"';
- return `// HomePage.tsx
-import { MyPlayer } from '../components/player';
+ return `import { MyPlayer } from '../components/player';
export const HomePage = () => {
return (
@@ -29,7 +28,7 @@ export default function ReactUsageCodeBlock() {
- React
+ ./app/page.tsx
diff --git a/site/src/components/installation/SkinPicker.tsx b/site/src/components/installation/SkinPicker.tsx
index 72de6c81..b50eed40 100644
--- a/site/src/components/installation/SkinPicker.tsx
+++ b/site/src/components/installation/SkinPicker.tsx
@@ -12,7 +12,8 @@ export default function SkinPicker() {
value={$skin}
onChange={(value) => skin.set(value as Skin)}
options={[
- { value: 'frosted' satisfies Skin, label: 'Frosted', image: },
+ { value: 'default-video' satisfies Skin, label: 'Default Video', image: },
+ { value: 'default-audio' satisfies Skin, label: 'Default Audio', image: },
{ value: 'minimal' satisfies Skin, label: 'Minimal', image: },
]}
aria-label="Select skin"
diff --git a/site/src/content/docs/how-to/installation.mdx b/site/src/content/docs/how-to/installation.mdx
index d22172c1..6664cf2c 100644
--- a/site/src/content/docs/how-to/installation.mdx
+++ b/site/src/content/docs/how-to/installation.mdx
@@ -20,12 +20,12 @@ import { TabsRoot, TabsList, TabsPanel, Tab } from '@/components/Tabs.tsx';
Video.js v10 is currently in _beta_. The API may evolve with [feedback🙏](https://github.com/videojs/v10/issues). See the [Changelog](https://github.com/videojs/v10/blob/main/CHANGELOG.md)\[todo\] for recent updates and the Roadmap for more details on what's coming.
-Video.js is **audio and video player components** — intentionally built to achieve minimal bundle sizes while providing framework-specific customization and a great viewer experience.
+Video.js is **audio and video player components** — intentionally built to achieve **minimal bundle sizes** while providing **framework-specific customization** and a **great viewer experience**.
Answer the questions below to get started quickly with your first embed code.
## Choose your JS framework
-Video.js aims to provide idiomatic development experiences in your favorite JS and CSS frameworks. More to come ([vote](https://github.com/videojs/v10/discussions/categories/ideas))\[todo\].
+Video.js aims to provide idiomatic development experiences in your favorite JS and CSS frameworks. More to come ([Vote on what's next](https://github.com/videojs/v10/discussions/categories/ideas))\[todo\].
@@ -41,25 +41,35 @@ The defaults work well for general website playback. More use case player preset
-## Choose your source type
+## Choose your media source type
-Video.js supports your favorite file types and hosting services. Whichever you choose can be easily changed later. ([missing something?](https://github.com/videojs/v10/discussions/categories/ideas))
+Video.js supports a wide range of file types and hosting services. It's easy to switch between them. ([missing something?](https://github.com/videojs/v10/discussions/categories/ideas))
-## Install your player
+## Install Video.js
- npm
+ cdn
+ npm
pnpm
yarn
bun
- cdn
+
+ ```html
+
+
+ ```
+
```bash
npm install @videojs/html
@@ -80,16 +90,6 @@ Video.js supports your favorite file types and hosting services. Whichever you c
bun add @videojs/html
```
-
- ```html
-
-
- ```
-
@@ -124,7 +124,6 @@ Video.js supports your favorite file types and hosting services. Whichever you c
-
## Use your player
@@ -134,6 +133,7 @@ Video.js supports your favorite file types and hosting services. Whichever you c
## Create your player
+Add it to your components folder in a new file.
@@ -145,3 +145,5 @@ Video.js supports your favorite file types and hosting services. Whichever you c
That's it! You now have a fully functional Video.js player. Go forth and play.
+
+Something not quite right? You can [submit an issue](https://github.com/videojs/v10/issues) and ask for help, or explore [other support options](/html5-video-support).
\ No newline at end of file
diff --git a/site/src/stores/installation.ts b/site/src/stores/installation.ts
index fda43a6b..25ae32bd 100644
--- a/site/src/stores/installation.ts
+++ b/site/src/stores/installation.ts
@@ -14,12 +14,12 @@ export type Renderer =
| 'wistia'
| 'youtube';
-export type Skin = 'frosted' | 'minimal';
+export type Skin = 'default-video' | 'default-audio' | 'minimal';
export type UseCase = 'default-video' | 'default-audio' | 'background-video';
export const renderer = atom('html5-video');
-export const skin = atom('frosted');
+export const skin = atom('default-video');
export const useCase = atom('default-video');
/** Mux playback ID from successful upload (used by code generation) */