From 0b85d9d71b1828ca872939de70e0b003740a39b4 Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Tue, 28 Feb 2023 06:39:08 +0100 Subject: [PATCH 1/5] Docs: update the issue template and wavesurfer links (#2671) * Docs: update the issue template * Update the readme * katspaugh/wavesurfer.js -> wavesurfer-js/wavesurfer.js --- .github/ISSUE_TEMPLATE.md | 23 ++++--- .github/workflows/publish.yml | 2 +- README.md | 77 +++++++++--------------- assets/readme.txt | 2 +- example/angular/index.html | 4 +- example/annotation/index.html | 4 +- example/audio-element/index.html | 4 +- example/bars/index.html | 4 +- example/cursor/index.html | 4 +- example/elan-wave-segment/index.html | 4 +- example/elan/index.html | 4 +- example/equalizer/index.html | 4 +- example/gradient-fill-styles/index.html | 4 +- example/html-init/index.html | 4 +- example/markers/index.html | 4 +- example/media-session/index.html | 4 +- example/mediaelement-webaudio/index.html | 4 +- example/microphone/index.html | 4 +- example/minimap-vertical/index.html | 4 +- example/minimap/index.html | 4 +- example/mute/index.html | 4 +- example/panner/index.html | 4 +- example/playhead/index.html | 4 +- example/playlist/index.html | 4 +- example/plugin-system/index.html | 4 +- example/regions/index.html | 4 +- example/rounded-bars/index.html | 4 +- example/rtl/index.html | 4 +- example/spectrogram/index.html | 4 +- example/split-channels/index.html | 4 +- example/split-wave-point-plot/index.html | 4 +- example/stretcher/index.html | 4 +- example/timeline-notches/index.html | 4 +- example/timeline/index.html | 4 +- example/vertical/index.html | 4 +- example/video-element/index.html | 4 +- example/zoom/index.html | 4 +- package.json | 4 +- 38 files changed, 115 insertions(+), 125 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 58391bf41..9a984ed64 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,17 +1,26 @@ -# Hey, thank you for testing and contributing to wavesurfer.js! +# Hey, thank you for using and contributing to wavesurfer.js! -## Please make sure you can check all of these points below before opening an issue: +## Need help with wavesurfer.js in your app? + +Please start a Q&A dicussion in our forum: https://github.com/wavesurfer-js/wavesurfer.js/discussions/new?category=q-a + +## Have an idea for a feature? + +Consider sharing it in the forum: https://github.com/wavesurfer-js/wavesurfer.js/discussions/new?category=ideas + +## You think you found a bug? + +### Please make sure you can check all of these points below before opening an issue: (You don't have to post this section) - [ ] I have checked [the FAQ](https://wavesurfer-js.org/faq/) and it doesn't solve my problem. - [ ] I have checked [the documentation](https://wavesurfer-js.org/docs/) and it doesn't solve my problem -- [ ] I have searched for [already open issues](https://github.com/katspaugh/wavesurfer.js/issues) which desribe my problem. -- [ ] The issue I'm having is related to and caused by wavesurfer.js, not by other software (which maybe packages and uses wavesurfer incorrectly) – In that case you should open the issue on the respective project pages. +- [ ] I have searched for [already open issues](https://github.com/wavesurfer-js/wavesurfer.js/issues) which desribe my problem. -## Please make sure you provide the following information (if applicable): +## Please make sure to provide the following information (if applicable): -### Wavesurfer.js version(s): +### wavesurfer.js version(s): ### Browser and operating system version(s): @@ -22,5 +31,5 @@ (Please reduce your code as much as possible and only post the minimum code needed to reproduce the issue. [A Code pen](http://codepen.io/) is an excellent way to share such code) -### Use behaviour needed to reproduce the issue: +### (Optional) Steps in the UI to reproduce the issue: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f17abaee..c81c22b45 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -59,6 +59,6 @@ jobs: -X POST \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: token $GITHUB_TOKEN" \ - 'https://api.github.com/repos/katspaugh/wavesurfer.js/releases' \ + 'https://api.github.com/repos/wavesurfer-js/wavesurfer.js/releases' \ -d "{\"tag_name\":\"$NEW_VERSION\", \"name\": \"$NEW_VERSION\"}" fi diff --git a/README.md b/README.md index 1ba4ed850..5772e60eb 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,38 @@ # [wavesurfer.js](https://wavesurfer-js.org) [![npm version](https://img.shields.io/npm/v/wavesurfer.js.svg?style=flat)](https://www.npmjs.com/package/wavesurfer.js) -![npm](https://img.shields.io/npm/dm/wavesurfer.js.svg) [![Join the chat at https://gitter.im/katspaugh/wavesurfer.js](https://badges.gitter.im/katspaugh/wavesurfer.js.svg)](https://gitter.im/katspaugh/wavesurfer.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/katspaugh/wavesurfer.js/badge)](https://www.gitpoap.io/gh/katspaugh/wavesurfer.js) +![npm](https://img.shields.io/npm/dm/wavesurfer.js.svg) [![Join the chat at https://gitter.im/wavesurfer-js/wavesurfer.js](https://badges.gitter.im/wavesurfer-js/wavesurfer.js.svg)](https://gitter.im/wavesurfer-js/wavesurfer.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/wavesurfer-js/wavesurfer.js/badge)](https://www.gitpoap.io/gh/wavesurfer-js/wavesurfer.js) Interactive navigable audio visualization using Web Audio and Canvas. -[![Screenshot](https://raw.githubusercontent.com/katspaugh/wavesurfer.js/gh-pages/example/screenshot.png "Screenshot")](https://wavesurfer-js.org) +[![Screenshot](https://raw.githubusercontent.com/wavesurfer-js/wavesurfer.js/gh-pages/example/screenshot.png "Screenshot")](https://wavesurfer-js.org) See a [tutorial](https://wavesurfer-js.org/docs) and [examples](https://wavesurfer-js.org/examples) on [wavesurfer-js.org](https://wavesurfer-js.org). -## Browser support -wavesurfer.js works only in [modern browsers supporting Web Audio](http://caniuse.com/audio-api). +## Questions +Have a question about integrating wavesurfer.js on your website? Feel free to ask in our forum: https://github.com/wavesurfer-js/wavesurfer.js/discussions/categories/q-a -It will fallback to Audio Element without graphics in other browsers (IE 11 and lower). +## Quick start -## FAQ -### Can the audio start playing before the waveform is drawn? -Yes, if you use the `backend: 'MediaElement'` option. See here: https://wavesurfer-js.org/example/audio-element/. The audio will start playing as you press play. A thin line will be displayed until the whole audio file is downloaded and decoded to draw the waveform. +``` +npm install wavesurfer.js --save + +# or + +yarn add wavesurfer.js -### Can drawing be done as file loads? -No. Web Audio needs the whole file to decode it in the browser. You can however load pre-decoded waveform data to draw the waveform immediately. See here: https://wavesurfer-js.org/example/audio-element/ (the "Pre-recoded Peaks" section). +# or -## API in examples + +``` -Choose a container: +Create a container in your HTML: ```html
``` -Create an instance, passing the container selector and [options](https://wavesurfer-js.org/docs/options.html): + +Create an instance of wavesufer.js, passing the container selector and a few [options](https://wavesurfer-js.org/docs/options.html): ```javascript var wavesurfer = WaveSurfer.create({ @@ -56,43 +60,20 @@ wavesurfer.load('example/media/demo.wav'); See the documentation on all available [methods](https://wavesurfer-js.org/docs/methods.html), [options](https://wavesurfer-js.org/docs/options.html) and [events](https://wavesurfer-js.org/docs/events.html) on the [homepage](https://wavesurfer-js.org/docs/). -## Upgrade - -See the [upgrade](https://github.com/katspaugh/wavesurfer.js/blob/master/UPGRADE.md) document if you're upgrading from a previous version of wavesurfer.js. - -## Using with a module bundler - -Install Wavesurfer: -```bash -npm install wavesurfer.js --save -# or -yarn add wavesurfer.js -``` - -Use it with a module system like this: -```javascript -// import -import WaveSurfer from 'wavesurfer.js'; +## Pojects using wavesurfer.js -// commonjs/requirejs -var WaveSurfer = require('wavesurfer.js'); - -// amd -define(['WaveSurfer'], function(WaveSurfer) { - // ... code -}); - -``` +For the list of projects using wavesurfer.js, check out +[the projects page](https://wavesurfer-js.org/projects/). -## Related projects +## Contributing -For a list of projects using wavesurfer.js, check out -[the projects page](https://wavesurfer-js.org/projects/). +Have an idea and want to contribute to wavesurfer.js? +Please first start a discussion in the [Ideas section of our forum](https://github.com/wavesurfer-js/wavesurfer.js/discussions/categories/ideas) to coordinate with the maintainers. -## Development +### Development -[![Build Status](https://github.com/katspaugh/wavesurfer.js/workflows/wavesurfer.js/badge.svg?branch=master)](https://github.com/katspaugh/wavesurfer.js/actions?workflow=wavesurfer.js) -[![Coverage Status](https://coveralls.io/repos/github/katspaugh/wavesurfer.js/badge.svg)](https://coveralls.io/github/katspaugh/wavesurfer.js) +[![Build Status](https://github.com/wavesurfer-js/wavesurfer.js/workflows/wavesurfer.js/badge.svg?branch=master)](https://github.com/wavesurfer-js/wavesurfer.js/actions?workflow=wavesurfer.js) +[![Coverage Status](https://coveralls.io/repos/github/wavesurfer-js/wavesurfer.js/badge.svg)](https://coveralls.io/github/wavesurfer-js/wavesurfer.js) ![Size](https://img.shields.io/bundlephobia/minzip/wavesurfer.js.svg?style=flat) Install development dependencies: @@ -134,7 +115,7 @@ npm run doc If you want to use [the VS Code - Debugger for Chrome](https://github.com/Microsoft/vscode-chrome-debug), there is already a [launch.json](.vscode/launch.json) with a properly configured ``sourceMapPathOverrides`` for you. ## Editing documentation -The homepage and documentation files are maintained in the [`gh-pages` branch](https://github.com/katspaugh/wavesurfer.js/tree/gh-pages). Contributions to the documentation are especially welcome. +The homepage and documentation files are maintained in the [`gh-pages` branch](https://github.com/wavesurfer-js/wavesurfer.js/tree/gh-pages). Contributions to the documentation are especially welcome. ## Updating the NPM package When preparing a new release, update the version in the `package.json` and have it merged to master. The new version of the package will be published to NPM automatically via GitHub Actions. @@ -143,7 +124,7 @@ When preparing a new release, update the version in the `package.json` and have The main maintainer: [Thijs Triemstra](https://github.com/thijstriemstra) -Many thanks to [all the awesome contributors](https://github.com/katspaugh/wavesurfer.js/contributors)! +Many thanks to [all the awesome contributors](https://github.com/wavesurfer-js/wavesurfer.js/contributors)! ## License diff --git a/assets/readme.txt b/assets/readme.txt index d23eb1031..f7db3a2c8 100644 --- a/assets/readme.txt +++ b/assets/readme.txt @@ -1,5 +1,5 @@ Logo is free to use with this project, link back to the official github page to support the project. -https://github.com/katspaugh/wavesurfer.js +https://github.com/wavesurfer-js/wavesurfer.js Available Logo Versions: - svg text logo (black/white) diff --git a/example/angular/index.html b/example/angular/index.html index dd066d325..7dccf0c09 100644 --- a/example/angular/index.html +++ b/example/angular/index.html @@ -88,7 +88,7 @@

wavesurfer.js Angular Demo

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -103,7 +103,7 @@

wavesurfer.js Angular Demo

diff --git a/example/annotation/index.html b/example/annotation/index.html index 6911e95c6..92bd81e54 100644 --- a/example/annotation/index.html +++ b/example/annotation/index.html @@ -223,7 +223,7 @@
Region Events
- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -236,7 +236,7 @@
Region Events
diff --git a/example/audio-element/index.html b/example/audio-element/index.html index 2edc46c61..cba325c27 100644 --- a/example/audio-element/index.html +++ b/example/audio-element/index.html @@ -107,7 +107,7 @@

Pre-rendered Peaks

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -122,7 +122,7 @@

Pre-rendered Peaks

diff --git a/example/bars/index.html b/example/bars/index.html index 04237eb75..811190f0a 100644 --- a/example/bars/index.html +++ b/example/bars/index.html @@ -133,7 +133,7 @@

splitChannelOptions

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -149,7 +149,7 @@

splitChannelOptions

diff --git a/example/cursor/index.html b/example/cursor/index.html index 45cddd9e6..7d8243875 100644 --- a/example/cursor/index.html +++ b/example/cursor/index.html @@ -87,7 +87,7 @@

Cursor plugin

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -103,7 +103,7 @@

Cursor plugin

diff --git a/example/elan-wave-segment/index.html b/example/elan-wave-segment/index.html index 6a5ab7b12..8dde4b853 100644 --- a/example/elan-wave-segment/index.html +++ b/example/elan-wave-segment/index.html @@ -160,7 +160,7 @@

Options

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -177,7 +177,7 @@

Options

diff --git a/example/elan/index.html b/example/elan/index.html index 69123c179..b8227011f 100644 --- a/example/elan/index.html +++ b/example/elan/index.html @@ -71,7 +71,7 @@

wavesurfer.js
- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
diff --git a/example/equalizer/index.html b/example/equalizer/index.html index 175fe102c..1343fb340 100644 --- a/example/equalizer/index.html +++ b/example/equalizer/index.html @@ -60,7 +60,7 @@

Equalizer Example

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -75,7 +75,7 @@

Equalizer Example

diff --git a/example/gradient-fill-styles/index.html b/example/gradient-fill-styles/index.html index 7a9c23a6d..e6812aa45 100644 --- a/example/gradient-fill-styles/index.html +++ b/example/gradient-fill-styles/index.html @@ -144,7 +144,7 @@

WaveSurfer Options

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -160,7 +160,7 @@

WaveSurfer Options

diff --git a/example/html-init/index.html b/example/html-init/index.html index 48205221f..43fcf5174 100644 --- a/example/html-init/index.html +++ b/example/html-init/index.html @@ -90,7 +90,7 @@

HTML initialisation API

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -105,7 +105,7 @@

HTML initialisation API

diff --git a/example/markers/index.html b/example/markers/index.html index af77a3b9c..5dbb8c06f 100644 --- a/example/markers/index.html +++ b/example/markers/index.html @@ -91,7 +91,7 @@

wavesurfer.js Markers

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -104,7 +104,7 @@

wavesurfer.js Markers

diff --git a/example/media-session/index.html b/example/media-session/index.html index cfe00e6e6..4a2e65310 100644 --- a/example/media-session/index.html +++ b/example/media-session/index.html @@ -145,14 +145,14 @@

Options

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
- Fork me on GitHub + Fork me on GitHub
diff --git a/example/mediaelement-webaudio/index.html b/example/mediaelement-webaudio/index.html index de879523a..68c5de062 100644 --- a/example/mediaelement-webaudio/index.html +++ b/example/mediaelement-webaudio/index.html @@ -127,7 +127,7 @@

Why use MediaElementWebAudio backend

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -135,7 +135,7 @@

Why use MediaElementWebAudio backend

- Fork me on GitHub + Fork me on GitHub
diff --git a/example/microphone/index.html b/example/microphone/index.html index 916497974..c37907405 100644 --- a/example/microphone/index.html +++ b/example/microphone/index.html @@ -185,14 +185,14 @@

Events

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
- Fork me on GitHub + Fork me on GitHub
diff --git a/example/minimap-vertical/index.html b/example/minimap-vertical/index.html index 39f8150fd..d0a09a6c2 100644 --- a/example/minimap-vertical/index.html +++ b/example/minimap-vertical/index.html @@ -115,7 +115,7 @@

How to use minimap in vertical mode

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -130,7 +130,7 @@

How to use minimap in vertical mode

diff --git a/example/minimap/index.html b/example/minimap/index.html index 6de4ad26e..fb7472825 100644 --- a/example/minimap/index.html +++ b/example/minimap/index.html @@ -86,14 +86,14 @@

Quick Start

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
- Fork me on GitHub + Fork me on GitHub
diff --git a/example/mute/index.html b/example/mute/index.html index 9d21cb749..5ad6219b7 100644 --- a/example/mute/index.html +++ b/example/mute/index.html @@ -49,14 +49,14 @@

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
diff --git a/example/panner/index.html b/example/panner/index.html index b595d1ce1..eb690cdac 100644 --- a/example/panner/index.html +++ b/example/panner/index.html @@ -139,7 +139,7 @@

4. Bind the Range Slider

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -154,7 +154,7 @@

4. Bind the Range Slider

diff --git a/example/playhead/index.html b/example/playhead/index.html index fc9c6f6dc..2d7d2be5b 100644 --- a/example/playhead/index.html +++ b/example/playhead/index.html @@ -88,7 +88,7 @@

wavesurfer.js Playhead plugin

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -101,7 +101,7 @@

wavesurfer.js Playhead plugin

diff --git a/example/playlist/index.html b/example/playlist/index.html index b069e2711..9a7445c97 100644 --- a/example/playlist/index.html +++ b/example/playlist/index.html @@ -81,7 +81,7 @@

wavesurfer.js Playlist Demo

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -96,7 +96,7 @@

wavesurfer.js Playlist Demo

diff --git a/example/plugin-system/index.html b/example/plugin-system/index.html index 9e55819aa..ded6af5b0 100644 --- a/example/plugin-system/index.html +++ b/example/plugin-system/index.html @@ -205,7 +205,7 @@

Create a plugin that extends an existing plugin

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -213,7 +213,7 @@

Create a plugin that extends an existing plugin

- Fork me on GitHub + Fork me on GitHub
diff --git a/example/regions/index.html b/example/regions/index.html index b0b22f216..f69dcf194 100644 --- a/example/regions/index.html +++ b/example/regions/index.html @@ -107,7 +107,7 @@

wavesurfer.js Regions

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -120,7 +120,7 @@

wavesurfer.js Regions

diff --git a/example/rounded-bars/index.html b/example/rounded-bars/index.html index 5a5036f75..e691e8ffc 100644 --- a/example/rounded-bars/index.html +++ b/example/rounded-bars/index.html @@ -82,7 +82,7 @@

Rounded bars example

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -98,7 +98,7 @@

Rounded bars example

diff --git a/example/rtl/index.html b/example/rtl/index.html index 97cfb1804..330422493 100644 --- a/example/rtl/index.html +++ b/example/rtl/index.html @@ -79,7 +79,7 @@

How to enable right-to-left

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -94,7 +94,7 @@

How to enable right-to-left

diff --git a/example/spectrogram/index.html b/example/spectrogram/index.html index 501c69bbe..8a18bbf9c 100644 --- a/example/spectrogram/index.html +++ b/example/spectrogram/index.html @@ -131,14 +131,14 @@

Generating a colorMap

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
- Fork me on GitHub + Fork me on GitHub
diff --git a/example/split-channels/index.html b/example/split-channels/index.html index 9d311e5bd..0ff9a2537 100644 --- a/example/split-channels/index.html +++ b/example/split-channels/index.html @@ -145,7 +145,7 @@

splitChannelOptions

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -159,7 +159,7 @@

splitChannelOptions

diff --git a/example/split-wave-point-plot/index.html b/example/split-wave-point-plot/index.html index 402250f61..15ac76df9 100644 --- a/example/split-wave-point-plot/index.html +++ b/example/split-wave-point-plot/index.html @@ -124,7 +124,7 @@

Options

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -138,7 +138,7 @@

Options

diff --git a/example/stretcher/index.html b/example/stretcher/index.html index cb95689cb..e00a5104b 100644 --- a/example/stretcher/index.html +++ b/example/stretcher/index.html @@ -74,14 +74,14 @@

wavesurfer.js Soundtouch Example

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
- Fork me on GitHub + Fork me on GitHub
diff --git a/example/timeline-notches/index.html b/example/timeline-notches/index.html index f15e6f7a2..3ee93df75 100644 --- a/example/timeline-notches/index.html +++ b/example/timeline-notches/index.html @@ -228,7 +228,7 @@

How to Override Timeline Formatting

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -243,7 +243,7 @@

How to Override Timeline Formatting

diff --git a/example/timeline/index.html b/example/timeline/index.html index 406e42788..2a8864ae2 100644 --- a/example/timeline/index.html +++ b/example/timeline/index.html @@ -118,14 +118,14 @@

Options

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
- Fork me on GitHub + Fork me on GitHub
diff --git a/example/vertical/index.html b/example/vertical/index.html index ec3a8367b..8af0572fb 100644 --- a/example/vertical/index.html +++ b/example/vertical/index.html @@ -92,7 +92,7 @@

How to enable vertical rendering

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -107,7 +107,7 @@

How to enable vertical rendering

diff --git a/example/video-element/index.html b/example/video-element/index.html index c46795e6e..d69cfb891 100644 --- a/example/video-element/index.html +++ b/example/video-element/index.html @@ -117,7 +117,7 @@

Pre-rendered Peaks

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -132,7 +132,7 @@

Pre-rendered Peaks

diff --git a/example/zoom/index.html b/example/zoom/index.html index 51180cb3b..f4f18ad03 100644 --- a/example/zoom/index.html +++ b/example/zoom/index.html @@ -95,7 +95,7 @@

How to Zoom

- wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License. + wavesurfer.js by katspaugh is licensed under a BSD-3-Clause License.
@@ -110,7 +110,7 @@

How to Zoom

diff --git a/package.json b/package.json index c5341839a..006863db4 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "repository": { "type": "git", - "url": "git://github.com/katspaugh/wavesurfer.js.git" + "url": "git://github.com/wavesurfer-js/wavesurfer.js.git" }, "publishConfig": { "registry": "https://registry.npmjs.org" @@ -43,7 +43,7 @@ "author": "", "license": "BSD-3-Clause", "bugs": { - "url": "https://github.com/katspaugh/wavesurfer.js/issues" + "url": "https://github.com/wavesurfer-js/wavesurfer.js/issues" }, "keywords": [ "waveform", From 4a84fc3679bae06c0302640989b25d9032f8c1e7 Mon Sep 17 00:00:00 2001 From: Anri Asaturov Date: Wed, 1 Mar 2023 06:30:20 +0200 Subject: [PATCH 2/5] Proxy HTMLMediaElement's 'waiting' event through MediaElement backend. (#2691) * Proxy HTMLMediaElement's 'waiting' event * fix --- src/mediaelement.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mediaelement.js b/src/mediaelement.js index c821e3f54..f79c6329a 100755 --- a/src/mediaelement.js +++ b/src/mediaelement.js @@ -65,6 +65,9 @@ export default class MediaElement extends WebAudio { this.mediaListeners.error = () => { this.fireEvent('error', 'Error loading media element'); }; + this.mediaListeners.waiting = () => { + this.fireEvent('waiting'); + }; this.mediaListeners.canplay = () => { this.fireEvent('canplay'); }; From 320f1140386abac3efa0b8ca5ea65a1be63765c1 Mon Sep 17 00:00:00 2001 From: Enton Biba Date: Wed, 1 Mar 2023 09:51:19 -0500 Subject: [PATCH 3/5] Fix iphone silent switch webaudio mute (#2686) fix iphone silent switch mode when using webaudio so it continues playing audio * Update CHANGES.md --- CHANGES.md | 1 + src/util/silence-mode.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 835e8ae55..7b4f587bb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ wavesurfer.js changelog ------------------ - Regions plugin: - Improved delta calculation (resize end) (#2641) +- Fix iphone silent switch webaudio mute (#2667) 6.4.0 (05.11.2022) ------------------ diff --git a/src/util/silence-mode.js b/src/util/silence-mode.js index 829974e27..94ce7e354 100644 --- a/src/util/silence-mode.js +++ b/src/util/silence-mode.js @@ -10,6 +10,13 @@ * @since 5.2.0 */ export default function ignoreSilenceMode() { + // Set webaudio context with 1 second silent audio 44100 bit rate buffer to allow playing audio even if silent switch is on the device + const silentAC = new AudioContext(); + const silentBS = silentAC.createBufferSource(); + silentBS.buffer = silentAC.createBuffer(1, 1, 44100); + silentBS.connect(silentAC.destination); + silentBS.start(); + // Set the src to a short bit of url encoded as a silent mp3 // NOTE The silence MP3 must be high quality, when web audio sounds are played // in parallel the web audio sound is mixed to match the bitrate of the html sound From 1ae22fd1c6d2fdae35e06f20f71e4f661729bfe0 Mon Sep 17 00:00:00 2001 From: Stefan de Konink Date: Wed, 1 Mar 2023 17:57:29 +0100 Subject: [PATCH 4/5] Fix typo (#2695) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5772e60eb..5a428bfed 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ wavesurfer.load('example/media/demo.wav'); See the documentation on all available [methods](https://wavesurfer-js.org/docs/methods.html), [options](https://wavesurfer-js.org/docs/options.html) and [events](https://wavesurfer-js.org/docs/events.html) on the [homepage](https://wavesurfer-js.org/docs/). -## Pojects using wavesurfer.js +## Projects using wavesurfer.js For the list of projects using wavesurfer.js, check out [the projects page](https://wavesurfer-js.org/projects/). From 1ffb823ce6eb96f4d341fa6e7143209c08c19c91 Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Fri, 3 Mar 2023 13:01:05 +0100 Subject: [PATCH 5/5] Docs: add an import snippet (#2700) --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a428bfed..69103ef18 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ See a [tutorial](https://wavesurfer-js.org/docs) and [examples](https://wavesurf Have a question about integrating wavesurfer.js on your website? Feel free to ask in our forum: https://github.com/wavesurfer-js/wavesurfer.js/discussions/categories/q-a ## Quick start +Install the package: ``` npm install wavesurfer.js --save @@ -21,10 +22,16 @@ npm install wavesurfer.js --save # or yarn add wavesurfer.js +``` -# or +And import it like so: +``` +import WaveSurfer from 'wavesurfer.js' +``` - +If you're not using a package manager, simply insert the script from a CDN: +``` + ``` Create a container in your HTML: