apache / cordova-plugin-media

Apache Cordova Media Plugin
https://cordova.apache.org/
Apache License 2.0
390 stars 763 forks source link

Audio from other app is not returning to continue playing after sound from plugin finish playing #392

Open hvma411 opened 5 months ago

hvma411 commented 5 months ago

Bug Report

Problem

If some other app is playing sound in background, for example if you listen music on Spotify, and then if you use other app with cordova-plugin-media which will play some sound then it stops music from Spotify and other apps. After sound is played Spotify is not comming back to playing.

What is expected to happen?

After plugin finish playing sound other apps from background which were playing music/other sounds should start playing again from moment whene plugin stoped it.

What does actually happen?

When plugin finish playing music/other sounds from other apps are not coming back to playing

Information

Command or Code

Just play some sound using this plugin while playing music on Spotify or other music apps

Environment, Platform, Device

Android and iOS

Version information

Checklist

RonnySchleicher commented 5 months ago

I have exactly the same problem. When will there be a reaction to the issue?

hvma411 commented 5 months ago

@RonnySchleicher if you use capacitor I suggest you to use Cap-go/native-audio.

RonnySchleicher commented 5 months ago

@hvma411 I'm using Cordova. But I'm trying to use this solution.

momikus commented 3 months ago

This is not fixed for ages. I hope it is fixed soon.

gliffen commented 1 month ago

I too would love to see a solution for this. Our app has various timers in it that play a sound when segments are completed. Would be great if the user's music could return after the timer plays it's sound.

I did find this plugin that I will try as an option when I go through our next dev cycle but if anyone else needs a more urgent fix, please let me know if this work for your use case. https://github.com/talisman-games/cordova-plugin-ui-sounds