Using latest Ionic 6 and Capacitor 3.4 and following the instructions here: Native Audio | Cordova Native Audio Plugin for Audio Playback
Note: I am using a fresh install just to insure the plugins I need from my old Ionic4/Cordova project will still work with Capacitor. I have this same plugin installed on my older Ionic4/Cordova app which has been running for several years now.
The plugin installs and works without error however there is no sound from the device. No errors are produced either. I can preloadComplex() the audio file and no error response, all OK. I then play or loop and the response is “OK” but no sound from the device. Volume is 100% and the old app still works on same device.
JS Audio also works OK.
const audio = new Audio('assets/sounds/notification_triple_ding_loud.mp3');
audio.play();
Please advise and thank you for any assistance. I am really enjoying Capacitor over Cordova.
Ionic:
Ionic CLI : 6.19.0
Ionic Framework : @ionic/angular 6.0.0
@angular-devkit/build-angular : 13.2.3
@angular-devkit/schematics : not installed
@angular/cli : 13.2.3
@ionic/angular-toolkit : 6.0.0
Capacitor:
Capacitor CLI : 3.4.3
@capacitor/core : 3.4.3
System:
NodeJS : v12.20.2
npm : 6.14.11
OS : Windows 10 Pro 19044.1586
1 post - 1 participant