Monday, March 11, 2024
HomeiOS Developmentandroid - Xamarin: Am i able to mute my app whereas enjoying...

android – Xamarin: Am i able to mute my app whereas enjoying a video that the music within the background doesn’t get stopped?


Within the final weeks earlier than migrating our xamarin-app to MAUI our buyer got here up with an very “vital” enchancment.. At the moment once we are enjoying a video in our app, the background music enjoying from spotify, youtube music, and so on. stops. This behaviour makes completely sense if our video would have an audio observe. However it hasn´t. So they need us to alter the code to nonetheless play music whereas watching the video (if the video has no audio observe).

I learn concerning the SetAudioFocusRequest for Android however this isn’t precisely what we’d like. Perhaps there’s a solution to set the audio focus for our app recurrently into background (or no matter it’s known as) and simply set the audio focus when now we have an audio observe.

FYI we’re enjoying movies through two methods. Both its an assist/instruction video (comprises audio) or an animated video (has no audio). These are separated and get known as in several areas. So we all know precisely, if the video has an audio observe or not (or in different phrases if now we have to mute the app or not).

Sadly I’ve not discovered something useful till but. Perhaps a few of you guys has confronted this problem and might help us.

Thanks upfront



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments