antimof / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.28k stars 177 forks source link

UxPlay doesn't restart streaming after the window is closed #28

Open rbribeiro opened 3 years ago

rbribeiro commented 3 years ago

If you start the mirroring and then close the window, UxPlay keeps running in the background and then you cannot see the iPad screen again unless you kill uxplay process.

I went through the UxPlay source code, but I wasn't able to figure out how it manages its window streaming. I thought this would be just a matter of using a callback and checking a window status, but, well, couldn't do it.

I think a solution would be to stop the whole thing when the window is closed, but I didn't find any callback to trigger when the window is closed... Is it hard to implement?

fduncanh commented 2 years ago

the callback issue when the UxPlay window is closed is fixed in the updated UxPlay pr #58. right now I set it to kill the server when the window is closed. Maybe you think it should instead "stay on line", and wait for a new iPad to connect? Might be possible quite easily (or not)

fduncanh commented 2 years ago

actually, reviewing your issue made me realize that the "correct" behavior when the mirror display window is closed is to relaunch the server, waiting for a new iPad or whatever to connect. I just fixed the updated UxPlay to do this. The the uxplay process itself is only terminated by ctrl-C in the terminal window. PR #58