Audio plays twice between screens

I am developing an app for webradio streaming.

There are two screen, Screen1 and Screen2

On Screen1 the player works correctly and on Screen2 I use webview to navigate a web page.

The problem is that, when I click on the play button on Screen1, the audio plays without problems, but when going to Screen2 to browse the web page, when returning to Screen1, the play button is shown as off, and when clicking, the Audio is played again by stepping on the previous one, playing twice.

Can someone help me with some simple method to prevent this?

you are opening screens without closing the previous one

Taifun

Hi there,

Thank you for your reply. Problem solved. Will you have any instructions or user posts that indicate how to play audio of the Screen1 in the background when exploring the Screen2?

I don’t think having 2 screens open is a good idea so you won’t be able to play it from screen 1. Maybe you can store the current time of the screen1 audio and start it on a lower volume on screen2 from that time? Even better would be to use vertical arrangements instead of a second screen. Hopefully someone comes with a better solution.

my suggestion is to use virtual screens, see tip 1

Taifun