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
Now that SoundCloud uses filePlayer we can have a generic `controls` prop
The only quirk is that Vimeo controls are not configurable and will always display
Serves as a better solution for #59 and #11
Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,7 @@ Prop | Description | Default
77
77
`url` | The url of a video or song to play
78
78
`playing` | Set to `true` or `false` to pause or play the media | `false`
79
79
`loop` | Set to `true` or `false` to loop the media | `false`
80
+
`controls` | Set to `true` or `false` to display native player controls<br />*Note: Vimeo player controls are not configurable and will always display* | `false`
80
81
`volume` | Sets the volume of the appropriate player | `0.8`
81
82
`width` | Sets the width of the player | `640`
82
83
`height` | Sets the height of the player | `360`
@@ -85,11 +86,11 @@ Prop | Description | Default
85
86
86
87
#### Callback props
87
88
88
-
Callback props take a function that gets fired on various player events
89
+
Callback props take a function that gets fired on various player events:
89
90
90
91
Prop | Description
91
92
---- | -----------
92
-
`onProgress` | Callback containing `played` and `loaded` progress as a fraction<br/>eg `{ played: 0.12, loaded: 0.34 }`
93
+
`onProgress` | Callback containing `played` and `loaded` progress as a fraction<br/>eg `{ played: 0.12, loaded: 0.34 }`
93
94
`onDuration` | Callback containing duration of the media, in seconds
94
95
`onStart` | Called when media starts playing
95
96
`onPlay` | Called when media starts or resumes playing after pausing or buffering
@@ -100,14 +101,14 @@ Prop | Description
100
101
101
102
#### Config props
102
103
103
-
These props allow you to override the parameters for the various players
104
+
These props allow you to override the parameters for the various players:
104
105
105
106
Prop | Description
106
107
---- | -----------
107
-
`soundcloudConfig` | Configuration object for the SoundCloud player.Set `clientId` to your own SoundCloud app [client ID](https://soundcloud.com/you/apps)
108
-
`vimeoConfig` | Configuration object for the Vimeo player.Set `iframeParams` to override the [default params](https://developer.vimeo.com/player/embedding#universal-parameters).Set `preload` for [preloading](#preloading)
109
-
`youtubeConfig` | Configuration object for the YouTube player.Set `playerVars` to override the [default player vars](https://developers.google.com/youtube/player_parameters?playerVersion=HTML5).Set `preload` for [preloading](#preloading)
110
-
`fileConfig` | Configuration object for the file player.Set `attributes` to apply [element attributes](https://developer.mozilla.org/en/docs/Web/HTML/Element/video#Attributes)
108
+
`soundcloudConfig` | Configuration object for the SoundCloud player.<br />Set `clientId` to your own SoundCloud app [client ID](https://soundcloud.com/you/apps).
109
+
`vimeoConfig` | Configuration object for the Vimeo player.<br />Set `iframeParams` to override the [default params](https://developer.vimeo.com/player/embedding#universal-parameters).<br />Set `preload` for [preloading](#preloading).
110
+
`youtubeConfig` | Configuration object for the YouTube player.<br />Set `playerVars` to override the [default player vars](https://developers.google.com/youtube/player_parameters?playerVersion=HTML5).<br />Set `preload` for [preloading](#preloading).
111
+
`fileConfig` | Configuration object for the file player.<br />Set `attributes` to apply [element attributes](https://developer.mozilla.org/en/docs/Web/HTML/Element/video#Attributes).
0 commit comments