This tool can be installed using
npm install trackswitch
alternatively you can manually download and include dist/css/trackswitch.min.css and
dist/js/trackswitch.min.js.
dist/
├── css/
│ ├── trackswitch.min.css
└── js/
├── trackswitch.js
└── trackswitch.min.js
If you use this software in a scientific publication, please make sure to cite the following publication
Werner, Nils, et al. "trackswitch.js: A Versatile Web-Based Audio Player for Presenting Scientific Results." 3rd web audio conference, London, UK. 2017.
@inproceedings{werner2017trackswitchjs,
title={trackswitch.js: A Versatile Web-Based Audio Player for Presenting Scientific Results},
author={Nils Werner and Stefan Balke and Fabian-Rober Stöter and Meinard Müller and Bernd Edler},
booktitle={3rd web audio conference, London, UK},
year={2017},
organization={Citeseer}
}
See examples.
trackswitch.js includes comprehensive keyboard shortcuts for controlling playback.
- Space - Play / Pause
- Escape - Stop playback and reset to beginning
- R - Toggle repeat mode
- ← / → - Seek backward/forward 2 seconds
- Shift + ← / → - Seek backward/forward 5 seconds
- Home - Jump to start
- ↑ / ↓ - Increase/decrease volume by 10%
When multiple players exist on a page, the last-clicked player receives keyboard input.
npm install
npm run build
This will compile Sass, concatenate files, and minify CSS/JS into the dist/ folder.
npm run build- Full build (clean, compile, minify)npm run build:css- Compile and minify CSS onlynpm run build:js- Concatenate and minify JS onlynpm run clean- Removedist/folder
