react-howler
Advanced tools
Comparing version
@@ -0,1 +1,9 @@ | ||
# 4.0.0 - 2020-09-23 | ||
- Added: Support `xhr` (#96) | ||
## Breaking Changes | ||
- Removed: Support `xhrWithCredentials` - now requiring Howler version >= `2.2.0` (#96) | ||
# 3.8.0 - 2020-09-01 | ||
@@ -2,0 +10,0 @@ |
@@ -77,3 +77,3 @@ 'use strict'; | ||
src: props.src, | ||
xhrWithCredentials: props.xhrWithCredentials, | ||
xhr: props.xhr, | ||
format: props.format, | ||
@@ -319,3 +319,3 @@ mute: props.mute, | ||
format: _propTypes2.default.arrayOf(_propTypes2.default.string), | ||
xhrWithCredentials: _propTypes2.default.bool, | ||
xhr: _propTypes2.default.object, | ||
playing: _propTypes2.default.bool, | ||
@@ -339,3 +339,3 @@ mute: _propTypes2.default.bool, | ||
format: [], | ||
xhrWithCredentials: false, | ||
xhr: {}, | ||
mute: false, | ||
@@ -342,0 +342,0 @@ preload: true, |
{ | ||
"name": "react-howler", | ||
"version": "3.8.0", | ||
"version": "4.0.0", | ||
"description": "A React.js wrapper for howler.js (audio player)", | ||
@@ -46,3 +46,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"howler": "^2.1.1", | ||
"howler": "^2.2.0", | ||
"prop-types": "^15.5.6" | ||
@@ -49,0 +49,0 @@ }, |
@@ -69,3 +69,3 @@ # react-howler | ||
format | [] | howler.js automatically detects your file format from the extension, but you may also specify a format in situations where extraction won't work (such as with a SoundCloud stream). | ||
xhrWithCredentials | false | Set to `true` if you want `withCredentials` flag on XHR request. [see reference](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials). | ||
xhr | {} | When using Web Audio, howler.js uses an XHR request to load the audio files. If you need to send custom headers, set the HTTP method or enable `withCredentials` ([see reference](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)), include them with this parameter. Each is optional (method defaults to `GET`, headers default to `null` and withCredentials defaults to `false`). For example: <pre lang="JSX">`<ReactHowler src="sound.webm" xhr={{ method: 'POST', headers: { Authorization: 'Bearer:' + token, }, withCredentials: true, }} />`</pre> | ||
onPlay | noop | Called when audio starts or resumes playing | ||
@@ -72,0 +72,0 @@ onPause | noop | Called when audio is paused |
23892
2.16%Updated