Skip to content

Commit de639e4

Browse files
committed
Update readme
1 parent de0c3fe commit de639e4

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,17 @@ When `preload` is set to `true` for players that support it, a short, silent vid
141141
#### Static Methods
142142

143143
Method | Description
144-
---- | -----------
144+
------ | -----------
145145
`ReactPlayer.canPlay(url)` | Determine if a URL can be played. This does *not* detect media that is unplayable due to privacy settings, streaming permissions, etc. In that case, the `onError` prop will be invoked after attemping to play. Any URL that does not match any patterns will fall back to a native HTML5 media player.
146+
`ReactPlayer.addCustomPlayer(CustomPlayer)` | Add a custom player. See [Adding custom players](#adding-custom-players)
147+
`ReactPlayer.removeCustomPlayers()` | Remove any players that have been added using `addCustomPlayer()`
146148

147149
#### Instance Methods
148150

149151
Use [`ref`](https://facebook.github.io/react/docs/refs-and-the-dom.html) to call instance methods on the player. See [the demo app](src/demo/App.js) for an example of this.
150152

151153
Method | Description
152-
---- | -----------
154+
------ | -----------
153155
`seekTo(amount)` | Seek to the given number of seconds, or fraction if `amount` is between `0` and `1`
154156
`getCurrentTime()` | Returns the number of seconds that has been played<br />&nbsp;&nbsp;Returns `null` if duration is unavailable
155157
`getDuration()` | Returns the duration (in seconds) of the currently playing media<br />&nbsp;&nbsp;Returns `null` if duration is unavailable
@@ -230,16 +232,16 @@ If you aren’t using React, you can still render a player using the standalone
230232

231233
See [`jsFiddle` example](https://jsfiddle.net/krkcvx9s/)
232234

233-
#### Adding your own players
235+
#### Adding custom players
234236

235-
If you have your own player, that is compatible with ReactPlayer's internal architecture, you can use it like this:
237+
If you have your own player that is compatible with ReactPlayers internal architecture, you can add it using `addCustomPlayer`:
236238

237239
```javascript
238240
import YourOwnPlayer from './somewhere';
239241
ReactPlayer.addCustomPlayer(YourOwnPlayer);
240242
```
241243

242-
Or you can clear all additional players:
244+
Use `removeCustomPlayers` to clear all custom players:
243245

244246
```javascript
245247
ReactPlayer.removeCustomPlayers();

0 commit comments

Comments
 (0)