Skip to content

Commit 423907a

Browse files
committed
feat: added poster prop and player icon on pause
1 parent e4b6013 commit 423907a

File tree

6 files changed

+19297
-19
lines changed

6 files changed

+19297
-19
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ react-all-player is a simple, lightweight, accessible and customizable React med
2727
## Usage
2828

2929
```bash
30-
npm install react-all-player # or yarn add react-all-player
30+
pnpm install react-all-player
3131
```
3232

3333
```jsx
@@ -56,6 +56,7 @@ import ReactAllPlayer from 'react-all-player';
5656
file: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt',
5757
},
5858
]}
59+
poster="https://pub-1ee15f86c7e94066bcff56e6e7ce5c02.r2.dev/View_From_A_Blue_Moon_Trailer-HD.jpg"
5960
/>;
6061
```
6162

@@ -88,7 +89,7 @@ react-all-player accepts video element props and these specific props
8889
| `hotkeys` | [Hotkey](https://github.com/asadbek064/react-all-player/blob/main/src/types/types.ts#L25)[] | Hotkeys (shortcuts) | [Default Hotkeys](https://github.com/asadbek064/react-all-player/blob/main/src/contexts/VideoPropsContext.tsx#L99) | `false` |
8990
| `components` | [Component](https://github.com/asadbek064/react-all-player/blob/main/src/contexts/VideoPropsContext.tsx#L99)[] | See [Customization](#customization) | [Default components](https://github.com/asadbek064/react-all-player/blob/main/src/contexts/VideoPropsContext.tsx#L46) | `false` |
9091
| `thumbnail` | string | Thumbnails on progress bar hover | `null` | `false` |
91-
92+
| `poster` | string | Video poster image on load | `null` | `false` |
9293
## Customization
9394

9495
You can customize the player by passing defined components with `components` props. See [defined components](https://github.com/asadbek064/react-all-player/blob/main/src/contexts/VideoPropsContext.tsx#L46)

0 commit comments

Comments
 (0)