- Ionic-Angular app to play mp3 audio files.
- Code from Simon Grimm - see 👏 Inspiration below, with updates & refactoring - e.g. use of ternery expressions. Updated to latest Ionic/Angular + dependencies. Strict mode enabled which required strict initialisation of properties, e.g. range, player to avoid errors.
- Note: to open web links in a new window use: ctrl+click on link
- Uses the Howler audio library to play mp3 files.
npm i
to install dependencies- To start the server on localhost://8100 type: 'ionic serve'
- To start the server on a mobile using Ionic devapp and connected via wifi, type: 'ionic serve --devapp'
- The Ionic DevApp was installed on an Android device from the Google Play app store.
home.page.ts
function to toggle Howl player play and pause functions
togglePlayer(pause: Boolean) {
this.isPlaying = !pause;
pause ? this.player.pause() : this.player.play();
}
- Howler audio library API defaults to the W3C Web Audio API and falls back to HTML5 Audio.
- Status: Working
- To-do: Nothing
- This project is licensed under the terms of the MIT license.
- Repo created by ABateman, email:
gomezbateman@yahoo.com