You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-2Lines changed: 65 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,9 +71,9 @@ Prop | Description | Default
71
71
`style` | Add [inline styles](https://facebook.github.io/react/tips/inline-styles.html) to the root element | `{}`
72
72
`light` | Set to `true` to show just the video thumbnail, which loads the full player on click<br /> ◦ Pass in an image URL to override the preview image | `false`
73
73
`fallback` | Element or component to use as a fallback if you are using lazy loading | `null`
74
-
`wrapper` | Element or component to use as the container element | null
74
+
`wrapper` | Element or component to use as the container element | `null`
75
75
`playIcon` | Element or component to use as the play icon in light mode
76
-
`previewTabIndex` | Set the tab index to be used on light mode | 0
76
+
`previewTabIndex` | Set the tab index to be used on light mode | `0`
77
77
78
78
#### Callback props
79
79
@@ -139,6 +139,69 @@ with the [HTMLMediaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTM
139
139
140
140
### Advanced Usage
141
141
142
+
#### Custom player controls
143
+
144
+
By default ReactPlayer is a chromeless player. By setting the `controls` prop to `true`, you can enable the native controls for the player. However, the controls will look different for each player. The ones based on HTML5 media players will look like the native controls for that browser, while the ones based on third-party players will look like the native controls for that player.
If you like to add your own custom controls in a convenient way, you can use
151
+
[Media Chrome](https://github.com/muxinc/media-chrome). Media Chrome is a library that provides a set of UI components that can be used to quickly build custom media controls.
152
+
153
+
##### Simple example ([Codesandbox](https://codesandbox.io/p/sandbox/react-player-media-chrome-simple-nl3pg4))
The `light` prop will render a video thumbnail with simple play icon, and only load the full player once a user has interacted with the image. [Noembed](https://noembed.com) is used to fetch thumbnails for a video URL. Note that automatic thumbnail fetching for Facebook, Wistia, Mixcloud and file URLs are not supported, and ongoing support for other URLs is not guaranteed.
0 commit comments