wavesurfer.js 7.0.1 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +9 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -18,7 +18,9 @@ wavesurfer.js v7 is a TypeScript rewrite of wavesurfer.js that brings several im
18
18
 
19
19
  ---
20
20
 
21
- Try it out:
21
+ ## Getting started
22
+
23
+ Install and import the package:
22
24
 
23
25
  ```bash
24
26
  npm install --save wavesurfer.js
@@ -27,11 +29,11 @@ npm install --save wavesurfer.js
27
29
  import WaveSurfer from 'wavesurfer.js'
28
30
  ```
29
31
 
30
- Alternatively, import it from a CDN as a ES6 module:
32
+ Alternatively, import it from a CDN as an ES6 module:
31
33
 
32
34
  ```html
33
35
  <script type="module">
34
- import WaveSurfer from 'https://unpkg.com/wavesurfer.js'
36
+ import WaveSurfer from 'https://unpkg.com/wavesurfer.js@7/dist/wavesurfer.esm.js'
35
37
 
36
38
  const wavesurfer = WaveSurfer.create({
37
39
  container: '#waveform',
@@ -44,20 +46,20 @@ Alternatively, import it from a CDN as a ES6 module:
44
46
 
45
47
  Or, as a UMD script tag which exports the library as a global `WaveSurfer` variable:
46
48
  ```html
47
- <script type="text/javascript" src="https://unpkg.com/wavesurfer.js/dist/wavesurfer.min.js"></script>
49
+ <script src="https://unpkg.com/wavesurfer.js@7/dist/wavesurfer.min.js"></script>
48
50
  ```
49
51
 
50
52
  To import one of the plugins, e.g. the Timeline plugin:
51
53
  ```js
52
54
  import Timeline from 'wavesurfer.js/dist/plugins/timeline.js'
53
55
 
54
- // or with a CDN:
56
+ // or from a CDN:
55
57
 
56
- import Timeline from 'https://unpkg.com/wavesurfer.js/dist/plugins/timeline.js'
58
+ import Timeline from 'https://unpkg.com/wavesurfer.js@7/dist/plugins/timeline.esm.js'
57
59
 
58
60
  // or as a script tag
59
61
 
60
- <script type="text/javascript" src="https://unpkg.com/wavesurfer.js/dist/plugins/timeline.min.js"></script>
62
+ <script src="https://unpkg.com/wavesurfer.js@7/dist/plugins/timeline.min.js"></script>
61
63
  ```
62
64
 
63
65
  TypeScript types are included in the package, so there's no need to install `@types/wavesurfer.js`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wavesurfer.js",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "license": "BSD-3-Clause",
5
5
  "author": "katspaugh",
6
6
  "description": "Navigable audio waveform player",
@@ -21,7 +21,7 @@
21
21
  "files": [
22
22
  "dist"
23
23
  ],
24
- "main": "./dist/wavesurfer.esm.js",
24
+ "main": "./dist/wavesurfer.min.js",
25
25
  "module": "./dist/wavesurfer.esm.js",
26
26
  "browser": "./dist/wavesurfer.esm.js",
27
27
  "types": "./dist/wavesurfer.d.ts",