cordova-plugin-media
cordova-plugin-media copied to clipboard
Stream stop playing after 10 min in both Android and IOS
Bug Report
I am facing multiple issues in both android / ios lets discuss one by one
1) Stream stop playing after 10-15 min if you keep device idle. Found this issue in both Android and IOS. It shows playing state but no sound.
2) In IOS , When running my app in background, media player stop working.
Earlier it was working fine.
I have applied following in my config.xml
<config-file target="* -Info.plist" parent="UIBackgroundModes" overwrite="true"><array><string>audio</string></array></config-file>
Environment, Platform, Device iOS - any version. Android- any version.
Checklist [✓ ] I searched for existing GitHub issues [ ✓ ] I updated all Cordova tooling to most recent version [ ✓ ] I included all the necessary information above
For anyone who facing the same issue, here is a work around. This issue can be caused by power saving tools. Since, power saving mode will restrict most background data and will stop syncing Live stream.
I am using a plugin cordova-plugin-foreground-service with cordova-media-plugin according to this-
_
An app will have restricted background processing if it is not considered a "foreground app" for android API 26+ and will prevent background pluggins from functioning properly. With this plugin your application will be a foreground app and let your background services run properly.
_
now my stream playing continuously.