From b3a17c8f99d2757a3ca87bb23e19b944c91716de Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 14 May 2019 08:04:54 -0700 Subject: [PATCH] Release 1.4.0 --- CHANGELOG.md | 2 +- docs/usage.md | 19 ++++++++++++++----- examples/minimal/index.html | 2 +- examples/minimalMilkdrop/index.html | 2 +- examples/readme.md | 3 +++ examples/webpack/package.json | 2 +- examples/webpackLazyLoad/package.json | 2 +- index.d.ts | 4 ++++ js/actionCreators/files.ts | 2 +- js/webampLazy.tsx | 8 ++++---- package.json | 2 +- 11 files changed, 32 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07d852c8..8d94a795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## NEXT [UNRELEASED] +## 1.4.0 ### Features diff --git a/docs/usage.md b/docs/usage.md index dac1cc92..0a5aac37 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -21,7 +21,7 @@ Or, you can include it via a script tag: ```html - + ``` ## Create a container @@ -46,7 +46,9 @@ if(!Webamp.browserIsSupported()) { throw new Error("What's the point of anything?") } +// All configuration options are optional. const webamp = new Webamp({ + // Optional. initialTracks: [{ metaData: { artist: "DJ Mike Llama", @@ -154,7 +156,14 @@ const options = { // A boolean indicating if this options should be made // available when the user is offline. requiresNetwork: true - }] + }], + + // Optional. Provide a custom way to derive `Track` objects from a drop event. + // Useful if your website has some DOM representation of a track that you can map to a URL/blob. + handleTrackDropEvent: async (e) => { + // Return an array of `Track` objects, see documentation below, or `null` to get the default drop behavior. + // You may optionally wrap the return value in a promise. + } }; const webamp = new Webamp(options); ``` @@ -231,7 +240,7 @@ webamp.seekBackward(10); Seek to a given time within the current track. -**Since** Unreleased +**Since** 1.4.0 ```JavaScript webamp.seekToTime(15.5); @@ -241,7 +250,7 @@ webamp.seekToTime(15.5); Get the current "playing" status. The return value is one of: `"PLAYING"`, `"STOPPED"`, or `"PAUSED"`. -**Since** Unreleased +**Since** 1.4.0 ```JavaScript const isPlaying = webamp.getMediaStatus() === "PLAYING"; @@ -271,7 +280,7 @@ webamp.play(); Stop the currently playing audio. Equivilant to pressing the "stop" button. -**Since** unreleased +**Since** 1.4.0 ```JavaScript webamp.stop(); diff --git a/examples/minimal/index.html b/examples/minimal/index.html index b3a8c467..c70b184d 100755 --- a/examples/minimal/index.html +++ b/examples/minimal/index.html @@ -9,7 +9,7 @@
- + +