From 730e23b1a0dfd2a12f708e3d0c88cdd3ac1ecb21 Mon Sep 17 00:00:00 2001 From: Samuel ORTION Date: Wed, 31 Mar 2021 08:38:30 +0200 Subject: [PATCH] Corrected DESC for last uploaded file --- public/explore/mysteries/index.php | 65 + public/explore/spectrograms/index.php | 69 + public/explore/spectrograms/scripts/script.js | 11 + public/home/last-uploaded-file.php | 11 +- public/scripts/wavesurfer/.babelrc | 22 + public/scripts/wavesurfer/.editorconfig | 11 + public/scripts/wavesurfer/.esdoc.json | 51 + public/scripts/wavesurfer/.eslintrc.js | 57 + .../wavesurfer/.github/ISSUE_TEMPLATE.md | 26 + .../.github/PULL_REQUEST_TEMPLATE.md | 21 + .../wavesurfer/.github/workflows/main.yml | 51 + .../wavesurfer/.github/workflows/publish.yml | 36 + public/scripts/wavesurfer/.gitignore | 19 + public/scripts/wavesurfer/.htmlhintrc | 12 + public/scripts/wavesurfer/.npmignore | 3 + public/scripts/wavesurfer/.vscode/launch.json | 18 + public/scripts/wavesurfer/CHANGES.md | 374 + public/scripts/wavesurfer/CNAME | 1 + public/scripts/wavesurfer/LICENSE | 29 + public/scripts/wavesurfer/README.md | 152 + public/scripts/wavesurfer/UPGRADE.md | 69 + public/scripts/wavesurfer/appveyor.yml | 28 + public/scripts/wavesurfer/assets/favicon.ico | Bin 0 -> 1150 bytes public/scripts/wavesurfer/assets/readme.txt | 11 + .../assets/wavesurfer-black-text.png | Bin 0 -> 25804 bytes .../assets/wavesurfer-black-text.svg | 52 + .../wavesurfer/assets/wavesurfer-black.png | Bin 0 -> 53910 bytes .../wavesurfer/assets/wavesurfer-black.svg | 58 + .../wavesurfer/assets/wavesurfer-symbol.png | Bin 0 -> 27252 bytes .../wavesurfer/assets/wavesurfer-symbol.svg | 31 + .../assets/wavesurfer-white-text.png | Bin 0 -> 51031 bytes .../assets/wavesurfer-white-text.svg | 59 + .../wavesurfer/assets/wavesurfer-white.png | Bin 0 -> 74862 bytes .../wavesurfer/assets/wavesurfer-white.svg | 65 + public/scripts/wavesurfer/bower.json | 14 + .../build-config/fragments/banner.js | 31 + .../build-config/fragments/common.js | 46 + .../wavesurfer/build-config/fragments/dev.js | 27 + .../build-config/fragments/htmlinit.js | 18 + .../wavesurfer/build-config/fragments/main.js | 18 + .../wavesurfer/build-config/fragments/min.js | 22 + .../build-config/fragments/plugins.js | 79 + .../wavesurfer/build-config/fragments/prod.js | 5 + .../build-config/webpack.dev.htmlinit.js | 8 + .../build-config/webpack.dev.main.js | 8 + .../build-config/webpack.dev.plugins.js | 8 + .../build-config/webpack.prod.htmlinit.js | 8 + .../build-config/webpack.prod.htmlinit.min.js | 13 + .../build-config/webpack.prod.main.js | 8 + .../build-config/webpack.prod.main.min.js | 13 + .../build-config/webpack.prod.plugins.js | 8 + .../build-config/webpack.prod.plugins.min.js | 13 + .../example/angular-material/index.html | 45 + .../example/angular-material/main.css | 35 + .../example/angular-material/main.js | 30 + .../md-player-audio.partial.html | 30 + .../angular-material/md-player.partial.html | 70 + .../angular-material/wavesurfer.directive.js | 463 + .../scripts/wavesurfer/example/angular/app.js | 65 + .../wavesurfer/example/angular/index.html | 120 + .../example/annotation/annotations.json | 332 + .../wavesurfer/example/annotation/app.css | 8 + .../wavesurfer/example/annotation/app.js | 257 + .../wavesurfer/example/annotation/index.html | 253 + .../example/annotation/rashomon.json | 47072 ++++++++++++++++ .../example/audio-element/index.html | 139 + .../wavesurfer/example/audio-element/main.js | 59 + .../wavesurfer/example/bars/index.html | 169 + .../scripts/wavesurfer/example/bars/main.js | 64 + .../scripts/wavesurfer/example/css/ribbon.css | 140 + .../scripts/wavesurfer/example/css/style.css | 110 + .../wavesurfer/example/cursor/index.html | 123 + .../scripts/wavesurfer/example/cursor/main.js | 35 + .../example/elan-wave-segment/index.html | 194 + public/scripts/wavesurfer/example/elan/app.js | 114 + .../wavesurfer/example/elan/css/elan.css | 25 + .../wavesurfer/example/elan/index.html | 105 + .../example/elan/transcripts/001z.mp3 | Bin 0 -> 352154 bytes .../example/elan/transcripts/001z.xml | 2866 + .../wavesurfer/example/equalizer/index.html | 92 + .../wavesurfer/example/equalizer/main.js | 137 + .../wavesurfer/example/html-init/index.html | 122 + public/scripts/wavesurfer/example/main.js | 107 + .../scripts/wavesurfer/example/markers/app.js | 50 + .../wavesurfer/example/markers/index.html | 121 + .../wavesurfer/example/media-session/app.js | 64 + .../example/media-session/index.html | 169 + .../wavesurfer/example/media/demo-peaks.json | 1 + .../scripts/wavesurfer/example/media/demo.wav | Bin 0 -> 480158 bytes .../wavesurfer/example/media/demo_video.mp4 | Bin 0 -> 367272 bytes .../wavesurfer/example/media/nasa.json | 1 + .../scripts/wavesurfer/example/media/nasa.mp4 | Bin 0 -> 4287315 bytes .../wavesurfer/example/media/stereo.mp3 | Bin 0 -> 1328810 bytes .../example/mediaelement-webaudio/app.js | 95 + .../example/mediaelement-webaudio/index.html | 152 + .../mediaelement-webaudio/stereo-peaks.json | 1 + .../wavesurfer/example/microphone/app.js | 62 + .../wavesurfer/example/microphone/index.html | 209 + .../scripts/wavesurfer/example/minimap/app.js | 38 + .../wavesurfer/example/minimap/index.html | 110 + public/scripts/wavesurfer/example/mute/app.js | 42 + .../wavesurfer/example/mute/index.html | 73 + .../wavesurfer/example/panner/index.html | 171 + .../scripts/wavesurfer/example/panner/main.js | 68 + .../wavesurfer/example/panner/media.wav | Bin 0 -> 2046444 bytes .../wavesurfer/example/playhead/app.js | 35 + .../wavesurfer/example/playhead/index.html | 118 + .../wavesurfer/example/playlist/app.js | 68 + .../wavesurfer/example/playlist/index.html | 113 + .../wavesurfer/example/plugin-system/app.js | 124 + .../custom-plugin/CursorCustomPlugin.js | 60 + .../example/plugin-system/index.html | 230 + .../scripts/wavesurfer/example/regions/app.js | 66 + .../wavesurfer/example/regions/index.html | 136 + .../example/rounded-bars/index.html | 118 + .../wavesurfer/example/rounded-bars/main.js | 31 + .../scripts/wavesurfer/example/rtl/index.html | 111 + public/scripts/wavesurfer/example/rtl/main.js | 26 + .../scripts/wavesurfer/example/screenshot.png | Bin 0 -> 64499 bytes .../wavesurfer/example/spectrogram/app.js | 64 + .../example/spectrogram/hot-colormap.json | 1 + .../wavesurfer/example/spectrogram/index.html | 150 + .../wavesurfer/example/split-channels/app.js | 94 + .../example/split-channels/index.html | 169 + .../example/split-wave-point-plot/index.html | 157 + .../wavesurfer/example/stretcher/app.js | 77 + .../wavesurfer/example/stretcher/index.html | 98 + .../example/stretcher/soundtouch.js | 1106 + .../example/timeline-notches/index.html | 261 + .../example/timeline-notches/main.js | 185 + .../wavesurfer/example/timeline/app.js | 53 + .../wavesurfer/example/timeline/index.html | 142 + public/scripts/wavesurfer/example/trivia.js | 75 + .../example/video-annotation/index.html | 108 + .../example/video-annotation/main.js | 261 + .../example/video-element/index.html | 149 + .../wavesurfer/example/video-element/main.js | 100 + .../wavesurfer/example/zoom/index.html | 127 + .../scripts/wavesurfer/example/zoom/main.js | 62 + public/scripts/wavesurfer/karma.conf.js | 151 + public/scripts/wavesurfer/package.json | 105 + public/scripts/wavesurfer/spec/drawer.spec.js | 87 + .../wavesurfer/spec/mediaelement-shared.js | 328 + .../spec/mediaelement-webaudio.spec.js | 13 + .../wavesurfer/spec/mediaelement.spec.js | 14 + .../scripts/wavesurfer/spec/peakcache.spec.js | 140 + .../wavesurfer/spec/plugin-api.spec.js | 167 + .../scripts/wavesurfer/spec/support/demo.wav | Bin 0 -> 480158 bytes .../wavesurfer/spec/support/stereo-peaks.json | 1 + .../wavesurfer/spec/support/stereo.mp3 | Bin 0 -> 1328810 bytes .../scripts/wavesurfer/spec/support/test.json | 1 + .../scripts/wavesurfer/spec/support/test.txt | 1 + .../scripts/wavesurfer/spec/test-helpers.js | 84 + public/scripts/wavesurfer/spec/util.spec.js | 258 + .../wavesurfer/spec/wavesurfer.spec.js | 513 + .../scripts/wavesurfer/spec/webaudio.spec.js | 46 + .../wavesurfer/src/drawer.canvasentry.js | 384 + public/scripts/wavesurfer/src/drawer.js | 403 + .../wavesurfer/src/drawer.multicanvas.js | 583 + public/scripts/wavesurfer/src/html-init.js | 241 + .../wavesurfer/src/mediaelement-webaudio.js | 77 + public/scripts/wavesurfer/src/mediaelement.js | 440 + public/scripts/wavesurfer/src/peakcache.js | 127 + .../wavesurfer/src/plugin/cursor/index.js | 339 + .../wavesurfer/src/plugin/elan/index.js | 307 + .../wavesurfer/src/plugin/markers/index.js | 274 + .../src/plugin/mediasession/index.js | 96 + .../wavesurfer/src/plugin/microphone/index.js | 415 + .../wavesurfer/src/plugin/minimap/index.js | 385 + .../wavesurfer/src/plugin/playhead/index.js | 226 + .../wavesurfer/src/plugin/regions/index.js | 435 + .../wavesurfer/src/plugin/regions/region.js | 763 + .../wavesurfer/src/plugin/spectrogram/fft.js | 222 + .../src/plugin/spectrogram/index.js | 486 + .../wavesurfer/src/plugin/timeline/index.js | 583 + public/scripts/wavesurfer/src/util/absMax.js | 16 + public/scripts/wavesurfer/src/util/clamp.js | 11 + public/scripts/wavesurfer/src/util/fetch.js | 222 + public/scripts/wavesurfer/src/util/frame.js | 13 + public/scripts/wavesurfer/src/util/get-id.js | 22 + public/scripts/wavesurfer/src/util/index.js | 12 + public/scripts/wavesurfer/src/util/max.js | 16 + public/scripts/wavesurfer/src/util/min.js | 16 + .../scripts/wavesurfer/src/util/observer.js | 144 + .../wavesurfer/src/util/prevent-click.js | 19 + .../src/util/request-animation-frame.js | 15 + public/scripts/wavesurfer/src/util/style.js | 16 + public/scripts/wavesurfer/src/wavesurfer.js | 1746 + public/scripts/wavesurfer/src/webaudio.js | 753 + public/styles/style.css | 18 +- public/upload/submitmetadata.php | 40 +- 191 files changed, 72997 insertions(+), 19 deletions(-) create mode 100644 public/explore/mysteries/index.php create mode 100644 public/explore/spectrograms/index.php create mode 100644 public/explore/spectrograms/scripts/script.js create mode 100644 public/scripts/wavesurfer/.babelrc create mode 100644 public/scripts/wavesurfer/.editorconfig create mode 100644 public/scripts/wavesurfer/.esdoc.json create mode 100644 public/scripts/wavesurfer/.eslintrc.js create mode 100644 public/scripts/wavesurfer/.github/ISSUE_TEMPLATE.md create mode 100644 public/scripts/wavesurfer/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 public/scripts/wavesurfer/.github/workflows/main.yml create mode 100644 public/scripts/wavesurfer/.github/workflows/publish.yml create mode 100644 public/scripts/wavesurfer/.gitignore create mode 100644 public/scripts/wavesurfer/.htmlhintrc create mode 100644 public/scripts/wavesurfer/.npmignore create mode 100644 public/scripts/wavesurfer/.vscode/launch.json create mode 100644 public/scripts/wavesurfer/CHANGES.md create mode 100644 public/scripts/wavesurfer/CNAME create mode 100644 public/scripts/wavesurfer/LICENSE create mode 100644 public/scripts/wavesurfer/README.md create mode 100644 public/scripts/wavesurfer/UPGRADE.md create mode 100644 public/scripts/wavesurfer/appveyor.yml create mode 100644 public/scripts/wavesurfer/assets/favicon.ico create mode 100644 public/scripts/wavesurfer/assets/readme.txt create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-black-text.png create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-black-text.svg create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-black.png create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-black.svg create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-symbol.png create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-symbol.svg create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-white-text.png create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-white-text.svg create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-white.png create mode 100644 public/scripts/wavesurfer/assets/wavesurfer-white.svg create mode 100644 public/scripts/wavesurfer/bower.json create mode 100644 public/scripts/wavesurfer/build-config/fragments/banner.js create mode 100644 public/scripts/wavesurfer/build-config/fragments/common.js create mode 100644 public/scripts/wavesurfer/build-config/fragments/dev.js create mode 100644 public/scripts/wavesurfer/build-config/fragments/htmlinit.js create mode 100644 public/scripts/wavesurfer/build-config/fragments/main.js create mode 100644 public/scripts/wavesurfer/build-config/fragments/min.js create mode 100644 public/scripts/wavesurfer/build-config/fragments/plugins.js create mode 100644 public/scripts/wavesurfer/build-config/fragments/prod.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.dev.htmlinit.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.dev.main.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.dev.plugins.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.prod.htmlinit.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.prod.htmlinit.min.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.prod.main.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.prod.main.min.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.prod.plugins.js create mode 100644 public/scripts/wavesurfer/build-config/webpack.prod.plugins.min.js create mode 100644 public/scripts/wavesurfer/example/angular-material/index.html create mode 100644 public/scripts/wavesurfer/example/angular-material/main.css create mode 100644 public/scripts/wavesurfer/example/angular-material/main.js create mode 100644 public/scripts/wavesurfer/example/angular-material/md-player-audio.partial.html create mode 100644 public/scripts/wavesurfer/example/angular-material/md-player.partial.html create mode 100644 public/scripts/wavesurfer/example/angular-material/wavesurfer.directive.js create mode 100644 public/scripts/wavesurfer/example/angular/app.js create mode 100644 public/scripts/wavesurfer/example/angular/index.html create mode 100644 public/scripts/wavesurfer/example/annotation/annotations.json create mode 100644 public/scripts/wavesurfer/example/annotation/app.css create mode 100644 public/scripts/wavesurfer/example/annotation/app.js create mode 100644 public/scripts/wavesurfer/example/annotation/index.html create mode 100644 public/scripts/wavesurfer/example/annotation/rashomon.json create mode 100644 public/scripts/wavesurfer/example/audio-element/index.html create mode 100644 public/scripts/wavesurfer/example/audio-element/main.js create mode 100644 public/scripts/wavesurfer/example/bars/index.html create mode 100644 public/scripts/wavesurfer/example/bars/main.js create mode 100644 public/scripts/wavesurfer/example/css/ribbon.css create mode 100644 public/scripts/wavesurfer/example/css/style.css create mode 100644 public/scripts/wavesurfer/example/cursor/index.html create mode 100644 public/scripts/wavesurfer/example/cursor/main.js create mode 100644 public/scripts/wavesurfer/example/elan-wave-segment/index.html create mode 100644 public/scripts/wavesurfer/example/elan/app.js create mode 100644 public/scripts/wavesurfer/example/elan/css/elan.css create mode 100644 public/scripts/wavesurfer/example/elan/index.html create mode 100644 public/scripts/wavesurfer/example/elan/transcripts/001z.mp3 create mode 100755 public/scripts/wavesurfer/example/elan/transcripts/001z.xml create mode 100644 public/scripts/wavesurfer/example/equalizer/index.html create mode 100644 public/scripts/wavesurfer/example/equalizer/main.js create mode 100644 public/scripts/wavesurfer/example/html-init/index.html create mode 100644 public/scripts/wavesurfer/example/main.js create mode 100644 public/scripts/wavesurfer/example/markers/app.js create mode 100644 public/scripts/wavesurfer/example/markers/index.html create mode 100644 public/scripts/wavesurfer/example/media-session/app.js create mode 100644 public/scripts/wavesurfer/example/media-session/index.html create mode 100644 public/scripts/wavesurfer/example/media/demo-peaks.json create mode 100644 public/scripts/wavesurfer/example/media/demo.wav create mode 100644 public/scripts/wavesurfer/example/media/demo_video.mp4 create mode 100644 public/scripts/wavesurfer/example/media/nasa.json create mode 100644 public/scripts/wavesurfer/example/media/nasa.mp4 create mode 100644 public/scripts/wavesurfer/example/media/stereo.mp3 create mode 100644 public/scripts/wavesurfer/example/mediaelement-webaudio/app.js create mode 100644 public/scripts/wavesurfer/example/mediaelement-webaudio/index.html create mode 100644 public/scripts/wavesurfer/example/mediaelement-webaudio/stereo-peaks.json create mode 100644 public/scripts/wavesurfer/example/microphone/app.js create mode 100644 public/scripts/wavesurfer/example/microphone/index.html create mode 100644 public/scripts/wavesurfer/example/minimap/app.js create mode 100644 public/scripts/wavesurfer/example/minimap/index.html create mode 100644 public/scripts/wavesurfer/example/mute/app.js create mode 100644 public/scripts/wavesurfer/example/mute/index.html create mode 100644 public/scripts/wavesurfer/example/panner/index.html create mode 100644 public/scripts/wavesurfer/example/panner/main.js create mode 100644 public/scripts/wavesurfer/example/panner/media.wav create mode 100644 public/scripts/wavesurfer/example/playhead/app.js create mode 100644 public/scripts/wavesurfer/example/playhead/index.html create mode 100644 public/scripts/wavesurfer/example/playlist/app.js create mode 100644 public/scripts/wavesurfer/example/playlist/index.html create mode 100644 public/scripts/wavesurfer/example/plugin-system/app.js create mode 100644 public/scripts/wavesurfer/example/plugin-system/custom-plugin/CursorCustomPlugin.js create mode 100644 public/scripts/wavesurfer/example/plugin-system/index.html create mode 100644 public/scripts/wavesurfer/example/regions/app.js create mode 100644 public/scripts/wavesurfer/example/regions/index.html create mode 100644 public/scripts/wavesurfer/example/rounded-bars/index.html create mode 100644 public/scripts/wavesurfer/example/rounded-bars/main.js create mode 100644 public/scripts/wavesurfer/example/rtl/index.html create mode 100644 public/scripts/wavesurfer/example/rtl/main.js create mode 100644 public/scripts/wavesurfer/example/screenshot.png create mode 100644 public/scripts/wavesurfer/example/spectrogram/app.js create mode 100644 public/scripts/wavesurfer/example/spectrogram/hot-colormap.json create mode 100644 public/scripts/wavesurfer/example/spectrogram/index.html create mode 100644 public/scripts/wavesurfer/example/split-channels/app.js create mode 100644 public/scripts/wavesurfer/example/split-channels/index.html create mode 100644 public/scripts/wavesurfer/example/split-wave-point-plot/index.html create mode 100644 public/scripts/wavesurfer/example/stretcher/app.js create mode 100644 public/scripts/wavesurfer/example/stretcher/index.html create mode 100644 public/scripts/wavesurfer/example/stretcher/soundtouch.js create mode 100644 public/scripts/wavesurfer/example/timeline-notches/index.html create mode 100644 public/scripts/wavesurfer/example/timeline-notches/main.js create mode 100644 public/scripts/wavesurfer/example/timeline/app.js create mode 100644 public/scripts/wavesurfer/example/timeline/index.html create mode 100644 public/scripts/wavesurfer/example/trivia.js create mode 100755 public/scripts/wavesurfer/example/video-annotation/index.html create mode 100755 public/scripts/wavesurfer/example/video-annotation/main.js create mode 100644 public/scripts/wavesurfer/example/video-element/index.html create mode 100644 public/scripts/wavesurfer/example/video-element/main.js create mode 100644 public/scripts/wavesurfer/example/zoom/index.html create mode 100644 public/scripts/wavesurfer/example/zoom/main.js create mode 100644 public/scripts/wavesurfer/karma.conf.js create mode 100644 public/scripts/wavesurfer/package.json create mode 100644 public/scripts/wavesurfer/spec/drawer.spec.js create mode 100644 public/scripts/wavesurfer/spec/mediaelement-shared.js create mode 100644 public/scripts/wavesurfer/spec/mediaelement-webaudio.spec.js create mode 100644 public/scripts/wavesurfer/spec/mediaelement.spec.js create mode 100755 public/scripts/wavesurfer/spec/peakcache.spec.js create mode 100644 public/scripts/wavesurfer/spec/plugin-api.spec.js create mode 100644 public/scripts/wavesurfer/spec/support/demo.wav create mode 100644 public/scripts/wavesurfer/spec/support/stereo-peaks.json create mode 100644 public/scripts/wavesurfer/spec/support/stereo.mp3 create mode 100644 public/scripts/wavesurfer/spec/support/test.json create mode 100644 public/scripts/wavesurfer/spec/support/test.txt create mode 100644 public/scripts/wavesurfer/spec/test-helpers.js create mode 100755 public/scripts/wavesurfer/spec/util.spec.js create mode 100755 public/scripts/wavesurfer/spec/wavesurfer.spec.js create mode 100644 public/scripts/wavesurfer/spec/webaudio.spec.js create mode 100644 public/scripts/wavesurfer/src/drawer.canvasentry.js create mode 100644 public/scripts/wavesurfer/src/drawer.js create mode 100644 public/scripts/wavesurfer/src/drawer.multicanvas.js create mode 100644 public/scripts/wavesurfer/src/html-init.js create mode 100644 public/scripts/wavesurfer/src/mediaelement-webaudio.js create mode 100755 public/scripts/wavesurfer/src/mediaelement.js create mode 100644 public/scripts/wavesurfer/src/peakcache.js create mode 100644 public/scripts/wavesurfer/src/plugin/cursor/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/elan/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/markers/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/mediasession/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/microphone/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/minimap/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/playhead/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/regions/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/regions/region.js create mode 100644 public/scripts/wavesurfer/src/plugin/spectrogram/fft.js create mode 100644 public/scripts/wavesurfer/src/plugin/spectrogram/index.js create mode 100644 public/scripts/wavesurfer/src/plugin/timeline/index.js create mode 100644 public/scripts/wavesurfer/src/util/absMax.js create mode 100644 public/scripts/wavesurfer/src/util/clamp.js create mode 100644 public/scripts/wavesurfer/src/util/fetch.js create mode 100644 public/scripts/wavesurfer/src/util/frame.js create mode 100644 public/scripts/wavesurfer/src/util/get-id.js create mode 100644 public/scripts/wavesurfer/src/util/index.js create mode 100644 public/scripts/wavesurfer/src/util/max.js create mode 100644 public/scripts/wavesurfer/src/util/min.js create mode 100644 public/scripts/wavesurfer/src/util/observer.js create mode 100644 public/scripts/wavesurfer/src/util/prevent-click.js create mode 100644 public/scripts/wavesurfer/src/util/request-animation-frame.js create mode 100644 public/scripts/wavesurfer/src/util/style.js create mode 100755 public/scripts/wavesurfer/src/wavesurfer.js create mode 100755 public/scripts/wavesurfer/src/webaudio.js diff --git a/public/explore/mysteries/index.php b/public/explore/mysteries/index.php new file mode 100644 index 0000000..174207f --- /dev/null +++ b/public/explore/mysteries/index.php @@ -0,0 +1,65 @@ + PDO::ERRMODE_EXCEPTION + )); +} catch (Exception $e) { + die("Error : ".$e->getMessage()); +} + +$req = $db->prepare('SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` WHERE species="unknown" ORDER BY `entry_timestamp` ASC LIMIT 1'); +$req->execute(); +$result = $req->fetchAll(); +?> + + + + + + + + Explore | Chiro - Canto + + + + + +
+

Mystery recording

+ +
+

+

+

Recorded on at

+ + " alt="bat sound spectrogram"> + +
+ +

+
+ +
+ + + + \ No newline at end of file diff --git a/public/explore/spectrograms/index.php b/public/explore/spectrograms/index.php new file mode 100644 index 0000000..a76e079 --- /dev/null +++ b/public/explore/spectrograms/index.php @@ -0,0 +1,69 @@ + PDO::ERRMODE_EXCEPTION + )); +} catch (Exception $e) { + die("Error : ".$e->getMessage()); +} + +$req = $db->prepare('SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` ORDER BY `entry_timestamp` ASC LIMIT 1'); +$req->execute(); +$result = $req->fetchAll(); +?> + + + + + + + + Explore | Chiro - Canto + + + + + +
+

Mystery recording

+ +
+

+

+

Recorded on at

+ + + +
+
+ +

+
+ +
+ + + + + + + \ No newline at end of file diff --git a/public/explore/spectrograms/scripts/script.js b/public/explore/spectrograms/scripts/script.js new file mode 100644 index 0000000..db8992f --- /dev/null +++ b/public/explore/spectrograms/scripts/script.js @@ -0,0 +1,11 @@ +var wavesurfer = WaveSurfer.create({ + container: '#waveform', + waveColor: 'violet', + progressColor: 'purple' +}); +wavesurfer.on('ready', function () { + wavesurfer.play(); +}); +let audio = document.getElementById('audio'); +let file_path = audio.src; +wavesurfer.load(file_path); \ No newline at end of file diff --git a/public/home/last-uploaded-file.php b/public/home/last-uploaded-file.php index 7e8445f..3718c12 100644 --- a/public/home/last-uploaded-file.php +++ b/public/home/last-uploaded-file.php @@ -13,7 +13,7 @@ try { die("Error : ".$e->getMessage()); } -$req = $db->prepare('SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` ORDER BY `entry_timestamp` ASC LIMIT 1'); +$req = $db->prepare('SELECT id, recordist_name, file_name, license, species, sound_type, date, time FROM `records` ORDER BY `entry_timestamp` DESC LIMIT 1'); $req->execute(); if ($data = $req->fetch()) { @@ -22,6 +22,15 @@ if ($data = $req->fetch())

Recorded on at

+ + " alt="bat sound spectrogram"> + +

diff --git a/public/scripts/wavesurfer/.babelrc b/public/scripts/wavesurfer/.babelrc new file mode 100644 index 0000000..37266c8 --- /dev/null +++ b/public/scripts/wavesurfer/.babelrc @@ -0,0 +1,22 @@ +{ + "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" + ] + }] + ] + } + } +} diff --git a/public/scripts/wavesurfer/.editorconfig b/public/scripts/wavesurfer/.editorconfig new file mode 100644 index 0000000..48a18f1 --- /dev/null +++ b/public/scripts/wavesurfer/.editorconfig @@ -0,0 +1,11 @@ +# 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 diff --git a/public/scripts/wavesurfer/.esdoc.json b/public/scripts/wavesurfer/.esdoc.json new file mode 100644 index 0000000..1b66744 --- /dev/null +++ b/public/scripts/wavesurfer/.esdoc.json @@ -0,0 +1,51 @@ +{ + "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$"] + } + } + ] +} diff --git a/public/scripts/wavesurfer/.eslintrc.js b/public/scripts/wavesurfer/.eslintrc.js new file mode 100644 index 0000000..03b8dfe --- /dev/null +++ b/public/scripts/wavesurfer/.eslintrc.js @@ -0,0 +1,57 @@ +/* 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 + } + }] +}; diff --git a/public/scripts/wavesurfer/.github/ISSUE_TEMPLATE.md b/public/scripts/wavesurfer/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..58391bf --- /dev/null +++ b/public/scripts/wavesurfer/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,26 @@ +# 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: + diff --git a/public/scripts/wavesurfer/.github/PULL_REQUEST_TEMPLATE.md b/public/scripts/wavesurfer/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f9002b0 --- /dev/null +++ b/public/scripts/wavesurfer/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ +# 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: diff --git a/public/scripts/wavesurfer/.github/workflows/main.yml b/public/scripts/wavesurfer/.github/workflows/main.yml new file mode 100644 index 0000000..f81910e --- /dev/null +++ b/public/scripts/wavesurfer/.github/workflows/main.yml @@ -0,0 +1,51 @@ +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 diff --git a/public/scripts/wavesurfer/.github/workflows/publish.yml b/public/scripts/wavesurfer/.github/workflows/publish.yml new file mode 100644 index 0000000..7b3aca7 --- /dev/null +++ b/public/scripts/wavesurfer/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +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 diff --git a/public/scripts/wavesurfer/.gitignore b/public/scripts/wavesurfer/.gitignore new file mode 100644 index 0000000..01bc097 --- /dev/null +++ b/public/scripts/wavesurfer/.gitignore @@ -0,0 +1,19 @@ +/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 diff --git a/public/scripts/wavesurfer/.htmlhintrc b/public/scripts/wavesurfer/.htmlhintrc new file mode 100644 index 0000000..ef86411 --- /dev/null +++ b/public/scripts/wavesurfer/.htmlhintrc @@ -0,0 +1,12 @@ +{ + "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 +} diff --git a/public/scripts/wavesurfer/.npmignore b/public/scripts/wavesurfer/.npmignore new file mode 100644 index 0000000..ea8c75d --- /dev/null +++ b/public/scripts/wavesurfer/.npmignore @@ -0,0 +1,3 @@ +# 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. diff --git a/public/scripts/wavesurfer/.vscode/launch.json b/public/scripts/wavesurfer/.vscode/launch.json new file mode 100644 index 0000000..d118a10 --- /dev/null +++ b/public/scripts/wavesurfer/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + "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}/*", + } + } + ] +} diff --git a/public/scripts/wavesurfer/CHANGES.md b/public/scripts/wavesurfer/CHANGES.md new file mode 100644 index 0000000..a08ec0b --- /dev/null +++ b/public/scripts/wavesurfer/CHANGES.md @@ -0,0 +1,374 @@ +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) diff --git a/public/scripts/wavesurfer/CNAME b/public/scripts/wavesurfer/CNAME new file mode 100644 index 0000000..c2b93c9 --- /dev/null +++ b/public/scripts/wavesurfer/CNAME @@ -0,0 +1 @@ +wavesurfer-js.org diff --git a/public/scripts/wavesurfer/LICENSE b/public/scripts/wavesurfer/LICENSE new file mode 100644 index 0000000..4894728 --- /dev/null +++ b/public/scripts/wavesurfer/LICENSE @@ -0,0 +1,29 @@ +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. diff --git a/public/scripts/wavesurfer/README.md b/public/scripts/wavesurfer/README.md new file mode 100644 index 0000000..805a3ae --- /dev/null +++ b/public/scripts/wavesurfer/README.md @@ -0,0 +1,152 @@ +# [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 +
+``` +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: [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). diff --git a/public/scripts/wavesurfer/UPGRADE.md b/public/scripts/wavesurfer/UPGRADE.md new file mode 100644 index 0000000..309800b --- /dev/null +++ b/public/scripts/wavesurfer/UPGRADE.md @@ -0,0 +1,69 @@ +# 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 ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/scripts/wavesurfer/example/angular-material/main.css b/public/scripts/wavesurfer/example/angular-material/main.css new file mode 100644 index 0000000..77d94af --- /dev/null +++ b/public/scripts/wavesurfer/example/angular-material/main.css @@ -0,0 +1,35 @@ +.text-center { + text-align: center !important; +} + +.text-left { + text-align: left !important;; +} + +.text-right { + text-align: right !important;; +} + +.text-justify { + text-align: justify !important;; +} + +md-icon[md-font-icon] { + font-size: 24px; +} + +md-toolbar.md-toolbar-sm .md-toolbar-tools { + max-height: 32px; + padding: 6px; + font-size: 16px; +} + +md-toolbar.md-toolbar-sm { + min-height: 24px; +} +.md-player-controls .md-button { + min-width: 44px; +} + + + diff --git a/public/scripts/wavesurfer/example/angular-material/main.js b/public/scripts/wavesurfer/example/angular-material/main.js new file mode 100644 index 0000000..1192bce --- /dev/null +++ b/public/scripts/wavesurfer/example/angular-material/main.js @@ -0,0 +1,30 @@ +/* global angular */ + +/** + * Created by intelWorx on 19/11/2015. + */ +(function() { + 'use strict'; + angular + .module('mdWavesurferApp', ['mdWavesurfer']) + .config(function($mdIconProvider) { + //$mdIconProvider.fontSet('zmdi', 'fontawesome'); + }) + .controller('MainController', [ + '$scope', + function($scope) { + $scope.urls = [ + '../media/demo.wav', + '../panner/media.wav', + '../elan/transcripts/001z.mp3' + ]; + $scope.longList = []; + for (let i = 0; i < 100; i++) { + $scope.longList.push({ + title: 'Long List test: ' + i, + url: $scope.urls[Math.floor(3 * Math.random())] + }); + } + } + ]); +})(); diff --git a/public/scripts/wavesurfer/example/angular-material/md-player-audio.partial.html b/public/scripts/wavesurfer/example/angular-material/md-player-audio.partial.html new file mode 100644 index 0000000..611ca99 --- /dev/null +++ b/public/scripts/wavesurfer/example/angular-material/md-player-audio.partial.html @@ -0,0 +1,30 @@ + +
+ +
+

Audio Player

+
+
+ + + +

+ {{$index+1}}. {{track.title}} +

+ +
+ {{track.duration | mdWavesurferTimeFormat}} +
+ +
+
+
+ + +
\ No newline at end of file diff --git a/public/scripts/wavesurfer/example/angular-material/md-player.partial.html b/public/scripts/wavesurfer/example/angular-material/md-player.partial.html new file mode 100644 index 0000000..9d9cfb0 --- /dev/null +++ b/public/scripts/wavesurfer/example/angular-material/md-player.partial.html @@ -0,0 +1,70 @@ +
+ +
+
+ {{control.currentTime | mdWavesurferTimeFormat}} +
+
+ {{control.title}} +
+
+ {{control.surfer.getDuration() | mdWavesurferTimeFormat}} +
+
+
+ + +
+
+ + +
+
+ + + {{btn.title}} + + + +
+ +
+ + + Rewind + + + + + + + {{control.surfer.isPlaying() ? 'Pause' : 'Play'}} + + + + + + + + Skip forward + + + +
+
+ + + Toggle mute + + + + +
+
+
+
\ No newline at end of file diff --git a/public/scripts/wavesurfer/example/angular-material/wavesurfer.directive.js b/public/scripts/wavesurfer/example/angular-material/wavesurfer.directive.js new file mode 100644 index 0000000..d28f0b4 --- /dev/null +++ b/public/scripts/wavesurfer/example/angular-material/wavesurfer.directive.js @@ -0,0 +1,463 @@ +/* global angular */ + +/** + * Created by intelWorx on 19/11/2015. + */ +(function() { + 'use strict'; + + /** + * Main module, your application should depend on this + * @module {mdWavesurfer} + */ + let app = angular.module('mdWavesurfer', ['ngMaterial']); + + /** + * @ngdoc service + * @name $mdWavesurferUtils + * + * @description + * + * Utility service for this directive, exposes method: + * - getLength(url), which returns a promise for the length of the audio specified by URL + * + * ```js + * app.directive('myFancyDirective', function(mdWavesurferUtils) { + * return { + * restrict: 'e', + * link: function(scope, el, attrs) { + * mdWavesurferUtils(attrs.url) + * .then(function(l){ + * scope.length = l; + * }, function(){ + * someErrorhandler() + * }) + * ; + * } + * }; + * }); + * ``` + */ + app.factory('mdWavesurferUtils', [ + '$q', + '$document', + '$timeout', + function($q, $document, $timeout) { + return { + getLength: function(object) { + let deferred = $q.defer(); + let estimateLength = function(url) { + let audio = $document[0].createElement('audio'); + audio.src = url; + audio.addEventListener( + 'loadeddata', + function listener() { + deferred.resolve(this.duration); + audio.removeEventListener( + 'loadeddata', + listener + ); + audio.src = 'data:audio/mpeg,0'; //destroy loading. + } + ); + + audio.addEventListener('error', function(e) { + deferred.resolve(e.target.error); + }); + }; + + if (typeof object === 'string') { + //this is a URL + estimateLength(object); + } else { + $timeout(function() { + deferred.reject( + new DOMError( + 'NotSupportedError', + 'Specified argument is not supported' + ) + ); + }); + } + + return deferred.promise; + } + }; + } + ]); + + /** + * @ngdoc filter + * @name mdWavesurferTimeFormat + * + * Simple filter to convert value in seconds to MM:SS format + * + * @param Number duration in seconds + */ + app.filter('mdWavesurferTimeFormat', function() { + return function(input) { + if (!input) { + return '00:00'; + } + + const minutes = Math.floor(input / 60); + const seconds = Math.floor(input) % 60; + + return ( + (minutes < 10 ? '0' : '') + + minutes + + ':' + + (seconds < 10 ? '0' : '') + + seconds + ); + }; + }); + + app.controller('mdWavesurferAudioController', [ + '$attrs', + '$element', + function(attributes, $element) { + let audio = this; + + audio.tracks = []; + audio.selectedIndex = audio.selectedIndex || 0; + audio.currentTrack = null; + + //adds to an audio track + audio.addTrack = function(trackScope) { + if (audio.tracks.indexOf(trackScope) < 0) { + audio.tracks.push(trackScope); + } + + if (!audio.currentTrack) { + audio.currentTrack = audio.tracks[audio.selectedIndex]; + } + }; + + //remove audio track + audio.removeTrack = function(trackScope) { + const idx = audio.tracks.indexOf(trackScope); + if (idx >= 0) { + audio.tracks.splice(idx, 1); + } + }; + + audio.playerProperties = {}; + let nKey; + for (let attr in attributes) { + if (attr.match(/^player/)) { + nKey = attr.replace(/^player([A-Z])/, function(m, $1) { + return $1.toLowerCase(); + }); + audio.playerProperties[nKey] = attributes[attr]; + } + } + + let getPlayer = function() { + return $element + .find('md-wavesurfer-player') + .controller('mdWavesurferPlayer'); + }; + let setAutoPlay = function(forcePlay) { + let controller = getPlayer(); + if ( + controller && + (forcePlay || controller.surfer.isPlaying()) + ) { + controller.autoPlay = true; + } + }; + audio.setTrack = function(idx, forcePlay) { + if (audio.tracks.length > idx) { + if (audio.selectedIndex === idx) { + let ctrl = getPlayer(); + ctrl.surfer.playPause(); + } else { + setAutoPlay(forcePlay); + audio.currentTrack = audio.tracks[idx]; + audio.selectedIndex = idx; + } + } + }; + + audio.extraButtons = [ + { + icon: 'zmdi zmdi-skip-previous', + title: 'Previous', + action: function($event) { + if (audio.selectedIndex > 0) { + audio.setTrack(audio.selectedIndex - 1); + } + }, + class: '' + }, + { + icon: 'zmdi zmdi-skip-next', + title: 'Next', + action: function($event) { + if (audio.selectedIndex < audio.tracks.length - 1) { + audio.setTrack(audio.selectedIndex + 1); + } + }, + class: '' + } + ]; + } + ]); + + /** + * @ngdoc directive + * @name md-wavesurfer-audio + * + * Directive for playing a set of audio files. This directive is analogous to `