mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
refactor(packages): move feature presets to subpath exports (#633)
This commit is contained in:
@@ -24,10 +24,10 @@ function App() {
|
||||
}
|
||||
|
||||
// ✅ Complete — copy, paste, run
|
||||
import { createPlayer, features, PlayButton } from '@videojs/react';
|
||||
import { Video } from '@videojs/react/video';
|
||||
import { createPlayer, PlayButton } from '@videojs/react';
|
||||
import { Video, videoFeatures } from '@videojs/react/video';
|
||||
|
||||
const Player = createPlayer({ features: [...features.video] });
|
||||
const Player = createPlayer({ features: videoFeatures });
|
||||
|
||||
function App() {
|
||||
return (
|
||||
@@ -78,10 +78,10 @@ Site pages use `<FrameworkCase>` and `<StyleCase>` to show code per framework. N
|
||||
**React:**
|
||||
|
||||
```tsx
|
||||
import { createPlayer, features, PlayButton } from '@videojs/react';
|
||||
import { Video } from '@videojs/react/video';
|
||||
import { createPlayer, PlayButton } from '@videojs/react';
|
||||
import { Video, videoFeatures } from '@videojs/react/video';
|
||||
|
||||
const Player = createPlayer({ features: [...features.video] });
|
||||
const Player = createPlayer({ features: videoFeatures });
|
||||
|
||||
export default function BasicUsage() {
|
||||
return (
|
||||
@@ -224,11 +224,11 @@ Show which file code belongs to when multiple files are involved:
|
||||
|
||||
````markdown
|
||||
```tsx title="App.tsx"
|
||||
import { createPlayer, features, PlayButton } from '@videojs/react';
|
||||
import { Video } from '@videojs/react/video';
|
||||
import { createPlayer, PlayButton } from '@videojs/react';
|
||||
import { Video, videoFeatures } from '@videojs/react/video';
|
||||
import './App.css';
|
||||
|
||||
const Player = createPlayer({ features: [...features.video] });
|
||||
const Player = createPlayer({ features: videoFeatures });
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user