Removed WaveSurfer files (cdn alternative)
2
composer.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
25
public/api/doc/index.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>API v1 Documentation | Chiro - Canto</title>
|
||||
<link rel="stylesheet" href="/styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
include("$root/menu.php");
|
||||
include("$root/header.php");
|
||||
?>
|
||||
<section>
|
||||
<h2>Documentation API v1</h2>
|
||||
</section>
|
||||
<?php
|
||||
include("$root/footer.php");
|
||||
?>
|
||||
</body>
|
||||
</html>
|
0
public/api/v1/index.php
Normal file
@ -1,21 +0,0 @@
|
||||
<form action="sendmessage.php" method="post">
|
||||
<label for="fname">First Name</label>
|
||||
<input type="text" id="fname" name="firstname" placeholder="Your first name.." required><br>
|
||||
|
||||
<label for="lname">Last Name</label>
|
||||
<input type="text" id="lname" name="lastname" placeholder="Your last name.." required><br>
|
||||
|
||||
<label for="email">Email</label>
|
||||
<input type="email" id="email" name="email" placeholder="Your email.." required><br>
|
||||
|
||||
<label for="website">Website</label>
|
||||
<input type="url" id="website" name="website" placeholder="Your website.."><br>
|
||||
|
||||
<!-- <label for="subject">Subject</label>
|
||||
<input type="text" id="subject" name="subject" placeholder="Your subject.." required><br> -->
|
||||
|
||||
<label for="message">Message</label>
|
||||
<textarea id="message" name="message" placeholder="Write something.." required style="height:200px"></textarea><br>
|
||||
|
||||
<input type="submit" value="Submit"><input type="reset" value="Reset">
|
||||
</form>
|
@ -1,33 +0,0 @@
|
||||
<?php session_start(); ?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Golden Book | Samuel ORTION</title>
|
||||
<link rel="stylesheet" type="text/css" href="/styles/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php include("/menus.php"); ?>
|
||||
<header>
|
||||
<h1>Samuel ORTION</h1>
|
||||
</header>
|
||||
<section>
|
||||
<article>
|
||||
<h1>Golden Book</h1>
|
||||
<h2>Send a message to community</h2>
|
||||
<?php include("form.php"); ?>
|
||||
<div class="error">
|
||||
<?=$_SESSION['error_msg']?>
|
||||
</div>
|
||||
<h2>See messages from community</h2>
|
||||
<?php include("messages.php"); ?>
|
||||
</article>
|
||||
</section>
|
||||
<?php include("/footer.php"); ?>
|
||||
</body>
|
||||
<script src="/scripts/script.js"></script>
|
||||
</html>
|
||||
|
@ -1,3 +0,0 @@
|
||||
<?php
|
||||
|
||||
?>
|
@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
require("/database/credentials.php");
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
// Connect the database
|
||||
try{
|
||||
$db = new PDO("mysql:host=$host;dbname=$database;charset=utf8",
|
||||
$user,
|
||||
$password,
|
||||
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
|
||||
));
|
||||
}catch (Exception $e){
|
||||
die("Error : ".$e->getMessage());
|
||||
}
|
||||
|
||||
/* Create Table if not exists */
|
||||
// $req = $db->prepare('CREATE TABLE IF NOT EXISTS golden_book ( `id` INT NOT NULL AUTO_INCREMENT , `firstname` VARCHAR(25) NOT NULL , `lastname` VARCHAR(25) NOT NULL , `email` VARCHAR(125) NOT NULL, `date` DATE NOT NULL DEFAULT CURRENT_TIMESTAMP , `message` TEXT NOT NULL , `website` VARCHAR(125) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;');
|
||||
// $req->execute();
|
||||
|
||||
/* Load entries */
|
||||
$error_msg = "";
|
||||
if (isset($_POST)) {
|
||||
if (isset($_POST['firstname'])) {
|
||||
$fname = $_POST['firstname'];
|
||||
} else {
|
||||
$error_msg .= "You have not entered a proper first name.\n";
|
||||
}
|
||||
if (isset($_POST['lastname'])) {
|
||||
$lname = $_POST['lastname'];
|
||||
} else {
|
||||
$error_msg .= "You have not entered a proper last name.\n";
|
||||
}
|
||||
if (isset($_POST['email'])) {
|
||||
$email = $_POST['email'];
|
||||
} else {
|
||||
$error_msg .= "You have not entered a proper email address.\n";
|
||||
}
|
||||
if (isset($_POST['website'])) {
|
||||
$website = $_POST['website'];
|
||||
}
|
||||
if (isset($_POST['message'])) {
|
||||
$message = $_POST['message'];
|
||||
} else {
|
||||
$error_msg .= "You have not entered a proper message.\n";
|
||||
}
|
||||
}
|
||||
if ($error_msg != "") {
|
||||
$_SESSION['error_msg'] = $error_msg;
|
||||
} else {
|
||||
/* Add given message */
|
||||
$req = $db->prepare("INSERT INTO golden_book (firstname, lastname, email, message, website) VALUES (:fname, :lname, :email, :message, :website)");
|
||||
$req->execute(array('fname'=>$fname, 'lname'=>$lname, 'email'=>$email, 'message'=>$message, 'website'=>$website));
|
||||
}
|
||||
header('Location: '.'index.php');
|
||||
?>
|
@ -48,7 +48,7 @@ echo $error_msg;
|
||||
|
||||
try {
|
||||
//Server settings
|
||||
$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
|
||||
// $mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
|
||||
$mail->isSMTP(); //Send using SMTP
|
||||
$mail->Timeout = 60;
|
||||
$mail->SMTPKeepAlive = true;
|
||||
|
@ -6,6 +6,6 @@
|
||||
<h2>Bat sound sharing tools</h2>
|
||||
</div>
|
||||
</a>
|
||||
<?php include("searchbar.php");?>
|
||||
<?php include("$root/search/searchbar.php");?>
|
||||
</div>
|
||||
</header>
|
BIN
public/media/pictures/icone.png
Normal file
After Width: | Height: | Size: 20 KiB |
@ -16,7 +16,7 @@
|
||||
<a href="/forum">
|
||||
<li>forum</li>
|
||||
</a>
|
||||
<a href="/mysteries">
|
||||
<a href="/explore/mysteries">
|
||||
<li>mysteries</li>
|
||||
</a>
|
||||
<a href="/articles">
|
||||
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["@babel/preset-env", {
|
||||
"targets": "last 3 version",
|
||||
"debug": false,
|
||||
"modules": "commonjs"
|
||||
}]
|
||||
],
|
||||
"plugins": ["transform-class-properties", "add-module-exports"],
|
||||
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": [
|
||||
["istanbul", {
|
||||
"exclude": [
|
||||
"spec/**/*.spec.js"
|
||||
]
|
||||
}]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
"source": "./src",
|
||||
"destination": "./doc",
|
||||
"plugins": [
|
||||
{
|
||||
"name": "esdoc-standard-plugin"
|
||||
},
|
||||
{
|
||||
"name": "esdoc-brand-plugin"
|
||||
},
|
||||
{
|
||||
"name": "esdoc-accessor-plugin",
|
||||
"option": {
|
||||
"access": ["public", "protected"],
|
||||
"autoPrivate": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "esdoc-ecmascript-proposal-plugin",
|
||||
"option": {
|
||||
"classProperties": true,
|
||||
"objectRestSpread": true,
|
||||
"exportExtensions": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "esdoc-coverage-plugin",
|
||||
"option": {
|
||||
"enable": true,
|
||||
"kind": [
|
||||
"class",
|
||||
"method",
|
||||
"member",
|
||||
"get",
|
||||
"set",
|
||||
"constructor",
|
||||
"function",
|
||||
"variable"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "esdoc-integrate-test-plugin",
|
||||
"option": {
|
||||
"source": "./spec/",
|
||||
"interfaces": ["describe", "it", "context", "suite", "test"],
|
||||
"includes": ["(spec|Spec|test|Test)\\.js$"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
/* eslint-disable */
|
||||
module.exports = {
|
||||
extends: ['eslint:recommended'], // extending recommended config and config derived from eslint-config-prettier
|
||||
parser: 'babel-eslint',
|
||||
globals: {
|
||||
WaveSurfer: true,
|
||||
Float32Array: true,
|
||||
Uint32Array: true,
|
||||
Promise: true,
|
||||
Uint8Array: true,
|
||||
ArrayBuffer: true,
|
||||
__VERSION__: true
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
commonjs: true
|
||||
},
|
||||
rules: {
|
||||
eqeqeq: 'off',
|
||||
'semi': 2,
|
||||
'curly': "error",
|
||||
"indent": ["error", 4, {
|
||||
"ignoredNodes": ["TemplateLiteral"],
|
||||
"SwitchCase": 1
|
||||
}],
|
||||
'comma-dangle': ["error", "never"],
|
||||
'comma-spacing': ["error", { "before": false, "after": true }],
|
||||
'no-console': 1,
|
||||
'no-unused-vars': 'off',
|
||||
'no-var': 'error',
|
||||
'no-unreachable': 2,
|
||||
'no-extra-semi': "error",
|
||||
'no-multi-spaces': "error",
|
||||
'no-multiple-empty-lines': "error",
|
||||
'space-infix-ops': "error",
|
||||
'valid-jsdoc': [2, {
|
||||
'requireReturn': false,
|
||||
'requireReturnType': false
|
||||
}],
|
||||
'no-trailing-spaces': "error",
|
||||
'no-dupe-keys': "error",
|
||||
'require-jsdoc': 2,
|
||||
'no-duplicate-imports': "error",
|
||||
'space-before-function-paren': ["error", "never"],
|
||||
'keyword-spacing': ["error", {"before": true}]
|
||||
},
|
||||
'overrides': [
|
||||
{
|
||||
'files': ['example/**/*.js', 'spec/**/*.js'],
|
||||
'rules': {
|
||||
'no-var': 'off',
|
||||
'no-console': 'off',
|
||||
'require-jsdoc': 0,
|
||||
'valid-jsdoc': 0
|
||||
}
|
||||
}]
|
||||
};
|
@ -1,26 +0,0 @@
|
||||
# Hey, thank you for testing and contributing to wavesurfer.js!
|
||||
|
||||
## 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.
|
||||
|
||||
## Please make sure you provide the following information (if applicable):
|
||||
|
||||
### Wavesurfer.js version(s):
|
||||
|
||||
|
||||
### Browser and operating system version(s):
|
||||
|
||||
|
||||
### Code needed to reproduce the issue:
|
||||
|
||||
(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:
|
||||
|
@ -1,21 +0,0 @@
|
||||
# Hey, thank you for contributing to wavesurfer.js!
|
||||
|
||||
To review/merge open PRs it is very helpful to know as much as possible about the changes which are being introduced. Reviewing PRs is very time consuming, please be patient, it can take some time to do properly.
|
||||
|
||||
**Title:** Please make sure the name of your PR is as descriptive as possible (Describe the feature that is introduced or the bug that is being fixed).
|
||||
|
||||
## Please make sure you provide the information below:
|
||||
|
||||
### Short description of changes:
|
||||
|
||||
|
||||
### Breaking in the external API:
|
||||
|
||||
|
||||
### Breaking changes in the internal API:
|
||||
|
||||
|
||||
### Todos/Notes:
|
||||
|
||||
|
||||
### Related Issues and other PRs:
|
@ -1,51 +0,0 @@
|
||||
name: wavesurfer.js
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update system
|
||||
run: sudo apt-get update
|
||||
- name: Install system dependencies
|
||||
run: sudo apt-get install -y ubuntu-restricted-addons chromium-codecs-ffmpeg-extra gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-vaapi
|
||||
- name: Using Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache Node.js modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-
|
||||
${{ runner.OS }}-
|
||||
- name: Install Node.js modules
|
||||
run: npm install
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Test
|
||||
run: npm run test
|
||||
- name: Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
path-to-lcov: ./coverage/lcov/lcov.info
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Documentation
|
||||
run: npm run doc
|
@ -1,36 +0,0 @@
|
||||
name: NPM Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
publish-npm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: Cache Node.js modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-
|
||||
${{ runner.OS }}-
|
||||
- run: npm install
|
||||
- name: Tag & publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||
run: |
|
||||
OLD_VERSION=$(npm show wavesurfer.js version)
|
||||
NEW_VERSION=$(node -p 'require("./package.json").version')
|
||||
if [ $NEW_VERSION != $OLD_VERSION ]; then
|
||||
git tag "$NEW_VERSION"
|
||||
git push --tags
|
||||
npm publish
|
||||
fi
|
19
public/scripts/wavesurfer/.gitignore
vendored
@ -1,19 +0,0 @@
|
||||
/dist
|
||||
|
||||
/node_modules
|
||||
/bower_components
|
||||
/npm-debug.log
|
||||
/coverage
|
||||
/_SpecRunner.html
|
||||
/doc
|
||||
/_site
|
||||
|
||||
.DS_Store
|
||||
.idea
|
||||
.project
|
||||
.chrome
|
||||
.build_cache
|
||||
.pydevproject
|
||||
|
||||
package-lock.json
|
||||
.package.json.swp
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"tagname-lowercase": true,
|
||||
"attr-lowercase": true,
|
||||
"attr-value-double-quotes": false,
|
||||
"doctype-first": false,
|
||||
"tag-pair": true,
|
||||
"spec-char-escape": false,
|
||||
"id-unique": true,
|
||||
"src-not-empty": true,
|
||||
"attr-no-duplication": true,
|
||||
"title-require": true
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
# Intentionally left blank, so that npm does not ignore anything by default,
|
||||
# but relies on the package.json "files" array to explicitly define what ends
|
||||
# up in the package.
|
18
public/scripts/wavesurfer/.vscode/launch.json
vendored
@ -1,18 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"name": "Launch Chrome against localhost",
|
||||
"url": "http://localhost:8080",
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"breakOnLoad": true,
|
||||
"sourceMaps": true,
|
||||
"sourceMapPathOverrides": {
|
||||
"webpack://WaveSurfer.[name]/./*": "${webRoot}/*",
|
||||
"webpack://WaveSurfer/./*": "${webRoot}/*",
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -1,374 +0,0 @@
|
||||
wavesurfer.js changelog
|
||||
=======================
|
||||
|
||||
x.x.x (unreleased)
|
||||
------------------
|
||||
- Playhead plugin: add a new plugin that allows the setting of a independent
|
||||
"play head", or song-start position. (#2209)
|
||||
- Markers plugin: fix a bug where markers at the end of a track would cause
|
||||
incorrect click-to-seek behavior (#2208)
|
||||
- Regions plugin:
|
||||
- Fix mouseup not firing if click & drag a region handle & release outside browser window (#2213)
|
||||
- Added new `showTooltip` param allowing disabling region `title` tooltip (#2213)
|
||||
- Nullify `onaudioprocess` on remove to not execute in background (#2218)
|
||||
|
||||
4.6.0 (04.03.2021)
|
||||
------------------
|
||||
- Webaudio: fix `decodeAudioData` handling in Safari (#2201)
|
||||
- Markers plugin: add new plugin that allows for timeline markers (#2196)
|
||||
|
||||
4.5.0 (14.02.2021)
|
||||
------------------
|
||||
- Split channels: `overlay` param now properly displays a single canvas (#2161)
|
||||
- Fixed memory leak with `destroy()` in `WebAudio` backend (#1940)
|
||||
- Fixed `WaveSurfer.load(url)` not working when passing a HTMLMediaElement as
|
||||
the url parameter, with the WebAudio backend.
|
||||
- Microphone plugin: remove deprecated `MediaStream.stop` call (#2168)
|
||||
- Regions plugin: stop region dragging when mouse leaves canvas (#2158)
|
||||
|
||||
4.4.0 (13.01.2021)
|
||||
------------------
|
||||
|
||||
- Use Webpack 5 for build (#2093)
|
||||
- Fix seeking issues for `WebAudio` backend (#2149)
|
||||
- Use `splitChannelsOptions` to color wave bars (#2150)
|
||||
|
||||
4.3.0 (12.12.2020)
|
||||
------------------
|
||||
|
||||
- Add `relativeNormalization` option to maintain proportionality between
|
||||
waveforms when `splitChannels` and `normalize` are `true` (#2108)
|
||||
- WebAudio backend: set playback rate modifying directly the playback
|
||||
property of the source node (#2118)
|
||||
- Spectrogram plugin: Use `ImageData` to draw pixel-by-pixel (#2127)
|
||||
|
||||
4.2.0 (20.10.2020)
|
||||
------------------
|
||||
|
||||
- Fix performance issues with `seekTo` while audio is playing (#2045)
|
||||
- Trigger `waveform-ready` event when provided peaks are drawn (#2031)
|
||||
|
||||
4.1.1 (24.09.2020)
|
||||
------------------
|
||||
|
||||
- Revert Code cleanup for Observer class (#2069)
|
||||
|
||||
4.1.0 (16.09.2020)
|
||||
------------------
|
||||
|
||||
- Don't call HTMLMediaElement#load when given peaks and preload == 'none'.
|
||||
Prevents browsers from pre-fetching audio (#1969, #1990)
|
||||
- `seekTo` bugfix inc. basic unit tests (#2047)
|
||||
- Fix unhandled `AbortError` thrown during `cancelAjax` (#2063)
|
||||
- Remove `util.extend`: deprecated since v3.3.0 (#1995)
|
||||
- Remove `util.ajax`: deprecated since v3.0.0 (#2033)
|
||||
- Regions plugin:
|
||||
- Removed `col-resize` cursor when resize is disabled (#1985)
|
||||
- Improved and unified loop playback logic (#1868)
|
||||
- Check `minLength` before resizing region (#2001)
|
||||
- Dragging and resizing will continue outside canvas (#2006)
|
||||
- `regionsMinLength` parameter to assign a min length to those regions for which the `minLength` is not specified (#2009)
|
||||
- Revert PR #1926 click propagation on regions. Use event parameter passed
|
||||
in `region-click` if you need `stopPropagation`. (#2024)
|
||||
- Edgescroll works for both edges (#2011)
|
||||
- Microphone plugin: move to separate directory (#1997)
|
||||
- Minimap plugin: move plugin to separate directory (#1999)
|
||||
- Cursor plugin: move plugin to separate directory (#1998)
|
||||
- Elan plugin: move plugin to separate directory (#2019)
|
||||
- Spectrogram plugin: move to separate directory (#1996)
|
||||
- Mediasession plugin: move to separate directory (#2020)
|
||||
- Timeline plugin: move to separate directory (#2018)
|
||||
|
||||
4.0.1 (23.06.2020)
|
||||
------------------
|
||||
|
||||
- Fixes for event handling with certain plugins (regions, microphone).
|
||||
The crash would have involved '_disabledEventEmissions' (#1975)
|
||||
|
||||
4.0.0 (21.06.2020)
|
||||
------------------
|
||||
|
||||
- Fixed mediaelement-webaudio playback under Safari (#1964)
|
||||
- Fixed the `destroy` method of the `MediaElementWebAudio` backend. Instead of
|
||||
destroying only the media element, the audio nodes are disconnected and the
|
||||
audio context is closed. This was done by splitting the `destroy` method of the
|
||||
`WebAudio` backend, so it calls the new `destroyWebAudio` method to cancel
|
||||
everything related to WebAudio (#1927)
|
||||
- Removed private methods of plugins and generalized plugins' access, so they can be extended creating custom
|
||||
plugins (#1928)
|
||||
- Added plugin inheritance example (#1921)
|
||||
- Added compatibility for Gatsby and other static site generators (#1938)
|
||||
- Minimap plugin: added the ability to use a customized regions plugin using a new parameter
|
||||
`regionsPluginName` (#1943)
|
||||
- Fixed waveform display to not always connect to the sample=0 point (#1942)
|
||||
- Elan plugin: optional params.tiers (#1910)
|
||||
- Regions plugin:
|
||||
- Split `regions.js` into `region.js` (containing `Region` class) and `index.js`.
|
||||
Both files moved into the `src/plugin/regions` directory. This makes it easier
|
||||
to extend these classes and use them in custom plugins (#1934)
|
||||
- Fixed channelCount assignment (#1858)
|
||||
- Fixed click propagation issue (#1926)
|
||||
- Fixed switch loop region (#1929)
|
||||
- Added ability to specify time format for Regions tooltip using timeformatCallback (#1948)
|
||||
- Add `splitChannelsOptions` param and `setFilteredChannels` method to configure how channels are drawn (#1947)
|
||||
- Added checks in `minimap` plugin for `drawer` presence (#1953)
|
||||
- Add `setDisabledEventEmissions` method to optionally disable calls to event handlers for specific events (#1960)
|
||||
- Drawer: removed private methods to allow overriding them (#1962)
|
||||
- Add optional `setMute` method to backends to fix muting behavior with the `MediaElement` backend (#1966)
|
||||
|
||||
3.3.3 (16.04.2020)
|
||||
------------------
|
||||
|
||||
- Change default `desynchronized` drawing context attribute to `false` (#1908)
|
||||
|
||||
3.3.2 (07.04.2020)
|
||||
------------------
|
||||
|
||||
- Use `requestAnimationFrame` for clearWave (#1884)
|
||||
- Fix `Unable to get property 'toLowerCase' of undefined or null reference`
|
||||
in IE11 (#1771)
|
||||
- Spectrogram plugin: correct the hamming windfunc formula (#1850)
|
||||
|
||||
3.3.1 (13.01.2020)
|
||||
------------------
|
||||
|
||||
- Regions plugin:
|
||||
- Improve handles style support (#1839)
|
||||
- Add support for a context menu event on a region (#1844)
|
||||
- Fix for handle position when using `channelIdx` param (#1845)
|
||||
|
||||
3.3.0 (29.12.2019)
|
||||
------------------
|
||||
|
||||
- `wavesurfer.exportPCM` now accepts an optional `end` argument and returns
|
||||
a Promise (#1728)
|
||||
- Add `wavesurfer.setPlayEnd(position)` to set a point in seconds for
|
||||
playback to stop at (#1795)
|
||||
- Add `drawingContextAttributes` option and enable canvas `desynchronized`
|
||||
hint (#1642)
|
||||
- Add `barMinHeight` option (#1693)
|
||||
- Expose progress to the `dblclick` event (#1790)
|
||||
- Deprecate `util.extend` and replace usage with `Object.assign` (#1825)
|
||||
- Regions plugin:
|
||||
- Add `start` argument to `play` and `playLoop` methods (#1794)
|
||||
- Add `maxRegions` option to limit max numbers of created regions (#1793)
|
||||
- Don't assign to module object (#1823)
|
||||
- Allow setting the `handleColor` inside `addRegion` (#1798)
|
||||
- Disable drag selection before enabling it (#1698)
|
||||
- Add `channelIdx` option to select specific channel to draw on (#1829)
|
||||
- Refactor for improved readability (#1826)
|
||||
- Cursor plugin: fix time visibility (#1802)
|
||||
|
||||
3.2.0 (24.10.2019)
|
||||
------------------
|
||||
|
||||
- New `MediaElementWebAudio` backend (#1767):
|
||||
- Allows you to use Web Audio API with big audio files, loading audio
|
||||
like with MediaElement backend (HTML5 audio tag), so you can use the
|
||||
same methods of MediaElement backend for loading and playback. This way,
|
||||
the audio resource is not loaded entirely from server, but in ranges,
|
||||
allowing you to use WebAudio features, like filters, on audio files with
|
||||
a long duration. You can also supply peaks data, so the entire audio file
|
||||
does not have to be decoded.
|
||||
For example:
|
||||
```
|
||||
wavesurfer.load(url | HTMLMediaElement, peaks, preload, duration);
|
||||
wavesurfer.play();
|
||||
wavesurfer.setFilter(customFilter);
|
||||
```
|
||||
- Add `barRadius` option to create waveforms with rounded bars (#953)
|
||||
- Throw error when the url parameter supplied to `wavesurfer.load()`
|
||||
is empty (#1773, #1775)
|
||||
- Specify non-minified wavesurfer.js in `main` entry of `package.json` (#1759)
|
||||
- Add `dblclick` event listener to wavesurfer wrapper (#1764)
|
||||
- Fix `destroy()` in `MediaElement` backend (#1778)
|
||||
- Cursor plugin: flip position of time text to left of the cursor where needed
|
||||
to improve readability (#1776)
|
||||
- Regions plugin: change region end handler position (#1762, #1781)
|
||||
|
||||
3.1.0 (26.09.2019)
|
||||
------------------
|
||||
|
||||
- Add `autoCenter` and `autoCenterRate` options (#1699)
|
||||
- Make sure `isReady` is true before firing the `ready` event (#1749)
|
||||
- Improve fetch error messages (#1748)
|
||||
- Use `MediaElement` backend for browsers that don't support WebAudio (#1739)
|
||||
- Regions plugin:
|
||||
- Use `isResizing` and `isDragging` to filter events in
|
||||
region-updated listener (#1716)
|
||||
- Fix `playLoop` and `loop` option for clips with duration <15s (#1626)
|
||||
- Spectrogram plugin: fix variable name in click handler (#1742)
|
||||
- Minimap plugin: fix left/width calculations for regions on retina/4k
|
||||
screens (#1743)
|
||||
- New example: video-annotation (#1726)
|
||||
|
||||
3.0.0 (11.07.2019)
|
||||
------------------
|
||||
|
||||
- Add `wavesurfer.getActivePlugins()`: return map of plugins
|
||||
that are currently initialised
|
||||
- Replace usage of `util.ajax` with `util.fetchFile` (#1365)
|
||||
- Update progress when seeking with HTML media controls (#1535)
|
||||
- Make sure mute/volume is updated when using `MediaElement` backend (#1615)
|
||||
- Refactor `MultiCanvas` and add `CanvasEntry` class (#1617)
|
||||
- Fix `wavesurfer.isReady`: make it a public boolean, the
|
||||
broken `isReady` method is removed (#1597)
|
||||
- Add support for `Blob` output type in `wavesurfer.exportImage` (#1610)
|
||||
- Fix fallback to Audio Element in browsers that don't support Web Audio (#1614)
|
||||
- `util.getId()` now accepts a `prefix` argument (#1619)
|
||||
- Improve documentation for `xhr` option (#1656)
|
||||
- Fix: the `progressWave` should not be rendered when specifying the same
|
||||
value for the `progressColor` and `waveColor` options (#1620)
|
||||
- Cursor plugin:
|
||||
- Add `formatTimeCallback` option
|
||||
- Add `followCursorY` option (#1605)
|
||||
- Remove deprecated `enableCursor` method (#1646)
|
||||
- Hide the cursor elements before first mouseover if `hideOnBlur` is set (#1663)
|
||||
- Spectrogram plugin:
|
||||
- Fix `ready` listener when loading multiple audio files (#1572)
|
||||
- Allow user to specify a colorMap (#1436)
|
||||
- Regions plugin:
|
||||
- Fix `ready` listener when loading multiple audio files (#1602)
|
||||
- Add `snapToGridInterval` and `snapToGridOffset` options (#1632)
|
||||
- Allow drawing regions over existing regions, if the underlying ones are not
|
||||
draggable or resizable (#1633)
|
||||
- Calculate the duration at event time to allow predefined regions to be
|
||||
dragged and resized (#1673)
|
||||
- Remove deprecated `initRegions` method (#1646)
|
||||
- Timeline plugin: fix `ready` listener when loading multiple
|
||||
audio files
|
||||
- Minimap plugin: remove deprecated `initMinimap` method (#1646)
|
||||
|
||||
Check `UPGRADE.md` for backward incompatible changes since v2.x.
|
||||
|
||||
2.2.1 (18.03.2019)
|
||||
------------------
|
||||
|
||||
- Add `backgroundColor` option (#1118)
|
||||
- Spectrogram plugin: fix click handler (#1585)
|
||||
- Cursor plugin: fix `displayTime` (#1589)
|
||||
|
||||
2.2.0 (07.03.2019)
|
||||
------------------
|
||||
|
||||
- Add `rtl` option (#1296)
|
||||
- Fix peaks rendering issue on zooming and scrolling multicanvas (#1570)
|
||||
- Add `duration` option to specify an explicit audio length (#1441)
|
||||
- Spectrogram plugin: fix event listener removal (#1571)
|
||||
- Regions plugin: display regions before file load using `duration`
|
||||
option (#1441)
|
||||
- Build: switch to terser-webpack-plugin for minifying
|
||||
|
||||
2.1.3 (21.01.2019)
|
||||
------------------
|
||||
|
||||
- Fix removeOnAudioProcess for Safari (#1215, #1367, #1398)
|
||||
|
||||
2.1.2 (06.01.2019)
|
||||
------------------
|
||||
|
||||
- Fix computing peaks when buffer is not set (#1530)
|
||||
- Cursor plugin: fix displayed time (#1543)
|
||||
- Cursor plugin: document new params (#1516)
|
||||
- Add syntax highlighting in examples (#1522)
|
||||
|
||||
2.1.1 (18.11.2018)
|
||||
------------------
|
||||
|
||||
- Fix order of arguments for PluginClass.constructor (#1472)
|
||||
- Microphone plugin: Safari support (#1377)
|
||||
- Minimap plugin: fix styling issues and add support for zooming (#1464)
|
||||
- Timeline plugin: add duration parameter handling (#1491)
|
||||
- Cursor plugin: add showTime option (#1143)
|
||||
- Fix: progress bar did not reach 100% when audio file is small (#1502)
|
||||
|
||||
2.1.0 (29.09.2018)
|
||||
------------------
|
||||
|
||||
- Add wavesurfer.js logo, created by @entonbiba (#1409)
|
||||
- Library version number is now available as `WaveSurfer.VERSION` (#1430)
|
||||
- Fix `setSinkId` that used deprecated API (#1428)
|
||||
- Set `isReady` attribute to false when emptying wavesufer (#1396, #1403)
|
||||
- Microphone plugin: make it work in MS Edge browser (#627)
|
||||
- Timeline plugin: display more tick marks as the user zooms in closely (#1455)
|
||||
- Cursor plugin: fix `destroy` (#1435)
|
||||
|
||||
2.0.6 (14.06.2018)
|
||||
------------------
|
||||
|
||||
- Build library using webpack 4 (#1376)
|
||||
- Add `audioScriptProcessor` option to use custom script processor node (#1389)
|
||||
- Added `mute` and `volume` events (#1345)
|
||||
|
||||
2.0.5 (26.02.2018)
|
||||
------------------
|
||||
|
||||
- Fix `util.ajax` on iterating `requestHeaders` (#1329)
|
||||
- Add version information to distributed files (#1330)
|
||||
- Regions plugin: prevent click when creating / updating region (#1295)
|
||||
- Add `wavesurfer.isReady` method (#1333)
|
||||
|
||||
2.0.4 (14.02.2018)
|
||||
------------------
|
||||
|
||||
- Added `xhr` option to configure util.ajax for authorization (#1310, #1038, #1100)
|
||||
- Fix `setCurrentTime` method (#1292)
|
||||
- Fix `getScrollX` method: Check bounds when `scrollParent: true` (#1312)
|
||||
- Minimap plugin: fix initial load, canvas click did not work (#1265)
|
||||
- Regions plugin: fix dragging a region utside of scrollbar (#430)
|
||||
|
||||
2.0.3 (22.01.2018)
|
||||
------------------
|
||||
|
||||
- Added support for selecting different audio output devices using `setSinkId` (#1293)
|
||||
- Replace deprecated playbackRate.value setter (#1302)
|
||||
- Play method now properly returns a Promise (#1229)
|
||||
|
||||
2.0.2 (10.01.2018)
|
||||
------------------
|
||||
|
||||
- Added `barGap` parameter to set the space between bars (#1058)
|
||||
- Replace deprecated gain.value setter (#1277)
|
||||
- MediaElement backend: Update progress on pause events (#1267)
|
||||
- Restore missing MediaSession plugin (#1286)
|
||||
|
||||
2.0.1 (18.12.2017)
|
||||
------------------
|
||||
|
||||
- Core library and the plugins were refactored to be modular so it can be used with a module bundler
|
||||
- Code updated to ES6/ES7 syntax and is transpiled with babel and webpack
|
||||
- New plugin API
|
||||
- `MultiCanvas` renderer is now the default
|
||||
- Added getters and setters for height and color options (#1145)
|
||||
- Introduce an option to prevent removing media element on destroy (#1163)
|
||||
- Added duration parameter for the load function (#1239)
|
||||
- New soundtouch.js filter to preserve pitch when changing tempo (#149)
|
||||
- Add `getPlaybackRate` method (#1022)
|
||||
- Switched to BSD license (#1060)
|
||||
- Added `setCurrentTime` method
|
||||
- Added `util.debounce` (#993)
|
||||
|
||||
1.2.4 (11.11.2016)
|
||||
------------------
|
||||
|
||||
- Fix a problem of Web Audio not playing in Safari on initial load (#749)
|
||||
|
||||
1.2.3 (09.11.2016)
|
||||
------------------
|
||||
|
||||
- Add a 'waveform-ready' event, triggered when waveform is drawn with MediaElement backend (#736)
|
||||
- Add a 'preload' parameter to load function to choose the preload HTML5 audio attribute value if MediaElement backend is choosen (#854)
|
||||
|
||||
1.2.2 (31.10.2016)
|
||||
------------------
|
||||
|
||||
- Deterministic way to mute and unmute a track (#841)
|
||||
- Replace jasmine with karma / jasmine test suite (#849)
|
||||
- Regions plugin: fix a bug when clicking on scroll-bar in Firefox (#851)
|
||||
|
||||
1.2.1 (01.10.2016)
|
||||
------------------
|
||||
|
||||
- Added changelog (#824)
|
||||
- Correct AMD module name for plugins (#831)
|
||||
- Fix to remove small gaps between regions (#834)
|
@ -1 +0,0 @@
|
||||
wavesurfer-js.org
|
@ -1,29 +0,0 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2012-2021, katspaugh and contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,152 +0,0 @@
|
||||
# [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)
|
||||
|
||||
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)
|
||||
|
||||
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).
|
||||
|
||||
It will fallback to Audio Element without graphics in other browsers (IE 11 and lower). You can also try [wavesurfer.swf](https://github.com/laurentvd/wavesurfer.swf) which is a Flash-based fallback.
|
||||
|
||||
## 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.
|
||||
|
||||
### 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).
|
||||
|
||||
## API in examples
|
||||
|
||||
Choose a container:
|
||||
```html
|
||||
<div id="waveform"></div>
|
||||
```
|
||||
Create an instance, passing the container selector and [options](https://wavesurfer-js.org/docs/options.html):
|
||||
|
||||
```javascript
|
||||
var wavesurfer = WaveSurfer.create({
|
||||
container: '#waveform',
|
||||
waveColor: 'violet',
|
||||
progressColor: 'purple'
|
||||
});
|
||||
```
|
||||
|
||||
Subscribe to some [events](https://wavesurfer-js.org/docs/events.html):
|
||||
|
||||
```javascript
|
||||
wavesurfer.on('ready', function () {
|
||||
wavesurfer.play();
|
||||
});
|
||||
```
|
||||
|
||||
Load an audio file from a URL:
|
||||
|
||||
```javascript
|
||||
wavesurfer.load('example/media/demo.wav');
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
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';
|
||||
|
||||
// commonjs/requirejs
|
||||
var WaveSurfer = require('wavesurfer.js');
|
||||
|
||||
// amd
|
||||
define(['WaveSurfer'], function(WaveSurfer) {
|
||||
// ... code
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
For a list of projects using wavesurfer.js, check out
|
||||
[the projects page](https://wavesurfer-js.org/projects/).
|
||||
|
||||
## 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)
|
||||
![Size](https://img.shields.io/bundlephobia/minzip/wavesurfer.js.svg?style=flat)
|
||||
|
||||
Install development dependencies:
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
Development tasks automatically rebuild certain parts of the library when files are changed (`start` – wavesurfer, `start:plugins` – plugins). Start a dev task and go to `localhost:8080/example/` to test the current build.
|
||||
|
||||
Start development server for core library:
|
||||
|
||||
```
|
||||
npm run start
|
||||
```
|
||||
|
||||
Start development server for plugins:
|
||||
|
||||
```
|
||||
npm run start:plugins
|
||||
```
|
||||
|
||||
Build all the files. (generated files are placed in the `dist` directory.)
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
Running tests only:
|
||||
|
||||
```
|
||||
npm run test
|
||||
```
|
||||
|
||||
Build documentation with esdoc (generated files are placed in the `doc` directory.)
|
||||
```
|
||||
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.
|
||||
|
||||
## 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.
|
||||
|
||||
## Credits
|
||||
|
||||
The main maintainer: <img src="https://avatars.githubusercontent.com/u/305679" width="16" height="16" /> [Thijs Triemstra](https://github.com/thijstriemstra)
|
||||
|
||||
Many thanks to [all the awesome contributors](https://github.com/katspaugh/wavesurfer.js/contributors)!
|
||||
|
||||
## License
|
||||
|
||||
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
|
||||
|
||||
This work is licensed under a
|
||||
[BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause).
|
@ -1,69 +0,0 @@
|
||||
# Upgrade
|
||||
|
||||
## Upgrading to version 3 from version 2
|
||||
|
||||
- `util.ajax` was deprecated; use `util.fetchFile instead.
|
||||
- The `xhr` wavesurfer option has changed to work with `util.fetchFile`.
|
||||
- The `MultiCanvas` renderer was refactored and a new `CanvasEntry` class was added to represent
|
||||
a canvas instance in a `MultiCanvas`.
|
||||
|
||||
## Upgrading to version 2 from version 1
|
||||
|
||||
The wavesurfer.js core library and the plugins were refactored to be modular so it can be used with a module bundler.
|
||||
You can still use wavesurfer without, e.g. with `<script>` tags. The code was also updated to ES6/ES7 syntax and
|
||||
is transpiled with Babel and Webpack. Read below how to update your code.
|
||||
|
||||
The API has mostly stayed the same but there are some changes to consider:
|
||||
|
||||
1. **MultiCanvas renderer is now the default:** It provides all functionality of the Canvas renderer. – Most likely you
|
||||
can simply remove the renderer option – The Canvas renderer has been removed. (The `renderer` option still exists but
|
||||
wavesurfer expects it to be a renderer object, not merely a string.)
|
||||
|
||||
2. **Constructor functions instead of object constructors**
|
||||
|
||||
```javascript
|
||||
// Old:
|
||||
var wavesurfer = Object.create(WaveSurfer);
|
||||
Wavesurfer.init(options);
|
||||
|
||||
// New:
|
||||
var wavesurfer = WaveSurfer.create(options);
|
||||
// ... or
|
||||
var wavesurfer = new WaveSurfer(options);
|
||||
wavesurfer.init();
|
||||
```
|
||||
|
||||
3. **New plugin API:** Previously all plugins had their own initialisation API. The new API replaces all
|
||||
these different ways to do the same thing with one plugin API built into the core library. Plugins are now
|
||||
added as a property of the wavesurfer configuration object during creation. You don't need to initialise the
|
||||
plugins yourself anymore. Below is an example of initialising wavesurfer with plugins (Note the different ways
|
||||
to import the library at the top):
|
||||
|
||||
```javascript
|
||||
// EITHER - accessing modules with <script> tags
|
||||
var WaveSurfer = window.WaveSurfer;
|
||||
var TimelinePlugin = window.WaveSurfer.timeline;
|
||||
var MinimapPlugin = window.WaveSurfer.minimap;
|
||||
|
||||
// OR - importing as es6 module
|
||||
import WaveSurfer from 'wavesurfer.js';
|
||||
import TimelinePlugin from 'wavesurfer.js/dist/plugin/wavesurfer.timeline.min.js';
|
||||
import MinimapPlugin from 'wavesurfer.js/dist/plugin/wavesurfer.minimap.min.js';
|
||||
|
||||
// OR - importing as require.js/commonjs modules
|
||||
var WaveSurfer = require('wavesurfer.js');
|
||||
var TimelinePlugin = require('wavesurfer.js/dist/plugin/wavesurfer.timeline.min.js');
|
||||
var MinimapPlugin = require('wavesurfer.js/dist/plugin/wavesurfer.minimap.min.js');
|
||||
|
||||
// ... initialising waveform with plugins
|
||||
var wavesurfer = WaveSurfer.create({
|
||||
container: '#waveform',
|
||||
waveColor: 'violet',
|
||||
plugins: [
|
||||
TimelinePlugin.create({
|
||||
container: '#wave-timeline'
|
||||
}),
|
||||
MinimapPlugin.create()
|
||||
]
|
||||
});
|
||||
```
|
@ -1,28 +0,0 @@
|
||||
environment:
|
||||
matrix:
|
||||
- nodejs_version: ''
|
||||
install:
|
||||
- choco install -y googlechrome --ignore-checksums
|
||||
- choco install -y firefox --ignore-checksums
|
||||
- ps: Install-Product node $env:nodejs_version
|
||||
- set CI=true
|
||||
- npm install --global npm@latest
|
||||
- set PATH=%APPDATA%\npm;%PATH%
|
||||
- npm install
|
||||
matrix:
|
||||
fast_finish: true
|
||||
# Disable automatic builds
|
||||
build: off
|
||||
# Do not build on gh tags
|
||||
skip_tags: true
|
||||
shallow_clone: true
|
||||
test_script:
|
||||
- node --version
|
||||
- npm --version
|
||||
- npm run lint
|
||||
- npm run build
|
||||
- npm run test
|
||||
- npm run doc
|
||||
cache:
|
||||
- '%APPDATA%\npm-cache'
|
||||
- node_modules -> package.json
|
Before Width: | Height: | Size: 1.1 KiB |
@ -1,11 +0,0 @@
|
||||
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
|
||||
|
||||
Available Logo Versions:
|
||||
- svg text logo (black/white)
|
||||
- svg full logo (black/white)
|
||||
- svg symbol logo
|
||||
|
||||
- png text logo (black/white)
|
||||
- png full logo (black/white)
|
||||
- png symbol logo
|
Before Width: | Height: | Size: 25 KiB |
@ -1,52 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1211" height="223" viewBox="0 0 1211 223">
|
||||
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||||
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c142 79.160924, 2017/07/13-01:06:39 ">
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<rdf:Description rdf:about=""/>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?xpacket end="w"?></metadata>
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
filter: url(#filter);
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
font-size: 291.667px;
|
||||
text-anchor: middle;
|
||||
fill: #e5e5e5;
|
||||
font-family: Verdana;
|
||||
}
|
||||
</style>
|
||||
<filter id="filter" filterUnits="userSpaceOnUse">
|
||||
<feFlood result="flood" flood-color="#171717"/>
|
||||
<feComposite result="composite" operator="in" in2="SourceGraphic"/>
|
||||
<feBlend result="blend" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<g id="black" class="cls-1">
|
||||
<text id="wavesurfer.js" class="cls-2" transform="translate(604.972 165.274) scale(0.635 0.642)"><tspan x="0">wavesurfer.js</tspan></text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 50 KiB |
@ -1,59 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1211" height="223" viewBox="0 0 1211 223">
|
||||
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||||
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c142 79.160924, 2017/07/13-01:06:39 ">
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<rdf:Description rdf:about=""/>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?xpacket end="w"?></metadata>
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
stroke: #000;
|
||||
stroke-linejoin: round;
|
||||
stroke-opacity: 0.11;
|
||||
stroke-width: 2px;
|
||||
filter: url(#filter);
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
font-size: 291.667px;
|
||||
text-anchor: middle;
|
||||
fill: #e5e5e5;
|
||||
font-family: Verdana;
|
||||
}
|
||||
</style>
|
||||
<filter id="filter" filterUnits="userSpaceOnUse">
|
||||
<feFlood result="flood" flood-color="#fdfdfd"/>
|
||||
<feComposite result="composite" operator="in" in2="SourceGraphic"/>
|
||||
<feBlend result="blend" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<g style="fill: ; filter: url(#filter)">
|
||||
<g id="white" class="cls-1" style="stroke: inherit; filter: none; fill: inherit">
|
||||
<text id="wavesurfer.js" class="cls-2" transform="translate(604.972 165.274) scale(0.635 0.642)"><tspan x="0">wavesurfer.js</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
<use xlink:href="#white" style="stroke: #000; filter: none; fill: none"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 34 KiB |
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "wavesurfer.js",
|
||||
"version": "4.6.0",
|
||||
"homepage": "https://wavesurfer-js.org",
|
||||
"authors": [
|
||||
"katspaugh <katspaugh@gmail.com>"
|
||||
],
|
||||
"description": "Navigable waveform built on Web Audio and Canvas",
|
||||
"main": "dist/wavesurfer.js",
|
||||
"keywords": [
|
||||
"waveform", "audio", "music", "player"
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/* eslint-env node */
|
||||
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const datefns = require('date-fns');
|
||||
|
||||
const rootDir = path.resolve(__dirname, '..', '..');
|
||||
const date = datefns.format(new Date(), 'yyyy-MM-dd');
|
||||
const pckg = require(path.join(rootDir, 'package.json'));
|
||||
|
||||
// library JS banner with copyright and version info
|
||||
// prettier-ignore
|
||||
const jsBanner = `${pckg.name} ${pckg.version} (${date})
|
||||
${pckg.homepage}
|
||||
@license ${pckg.license}`;
|
||||
const libBanner = new webpack.BannerPlugin({
|
||||
banner: jsBanner,
|
||||
test: /\.js$/
|
||||
});
|
||||
|
||||
// plugin JS banner with copyright and version info
|
||||
// prettier-ignore
|
||||
const jsPluginBanner = `${pckg.name} [name] plugin ${pckg.version} (${date})
|
||||
${pckg.homepage}
|
||||
@license ${pckg.license}`;
|
||||
const pluginBanner = new webpack.BannerPlugin({
|
||||
banner: jsPluginBanner,
|
||||
test: /\.js$/
|
||||
});
|
||||
|
||||
module.exports = { libBanner, pluginBanner };
|
@ -1,46 +0,0 @@
|
||||
/* eslint-env node */
|
||||
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const datefns = require('date-fns');
|
||||
|
||||
const rootDir = path.resolve(__dirname, '..', '..');
|
||||
const pckg = require(path.join(rootDir, 'package.json'));
|
||||
|
||||
// enable logging of deprecation warnings stacktrace
|
||||
process.traceDeprecation = true;
|
||||
|
||||
// inject JS version number
|
||||
const jsVersionPlugin = new webpack.DefinePlugin({
|
||||
__VERSION_ |