I created my local website for a magic mirror project. This project includes my google calendar, weather ifo, timers, internet radio, ...
For the timers and internet radio I would like to hear the audio through my bluetooth speakers. These are connected correctly. In an SSH window I'm able to playback a wav file through the speakers using:
- aplay /usr/share/sounds/alsa/Front_Center.wav
- sudo -u www-data aplay /usr/share/sounds/alsa/Front_Center.wav
This also works for user www-data (after adding this user to the audio group). But I can't manage to make the audio play from my webserver which is starting up in kiosk mode in Chromium.
Am I missing something? However, when trying to play back audio with omxplayer, this is also not working. When closing Chromium and starting up VLC player, the audi ois played through my bluetooth speakers.
EDIT: I got some extra info now. Just tried starting up my pi in kiosk mode, then shutting down Chromium (ALT-F4). When arriving on the desktop, I open a terminal to start chromium again in kiosk mode. Now the audio is working fine on the webserver. Could it be the order in which certain things are executed? Starting in kioskmode is executed from ~/.config/lxsessions/LXDE-pi/autostart: chromium-browser --noerrdialogs --kiosk localhost --disable-translate