mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
docs(site): add 'use client' to homepage React snippet (#1529)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ddfd1f1d6a
commit
740ac66a3d
@@ -20,7 +20,9 @@ export function generateReactCode(skin: Skin): string {
|
||||
const skinComponent = skin === 'default' ? 'VideoSkin' : 'MinimalVideoSkin';
|
||||
const skinCss = skin === 'default' ? 'skin' : 'minimal-skin';
|
||||
|
||||
return `import { createPlayer } from '@videojs/react';
|
||||
return `'use client';
|
||||
|
||||
import { createPlayer } from '@videojs/react';
|
||||
import { ${skinComponent}, Video, videoFeatures } from '@videojs/react/video';
|
||||
import '@videojs/react/video/${skinCss}.css';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user