Trigger Sound when app is not running in background in ionic 5

I want to make an app that is play sound for 10 minutes when the app is not running in the background.
i tried Local notification and alarm too,
but I can’t manage to play sound for 10 minutes