Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let the loading spinner be visible until the video stream is recieved #1487

Open
comsyspro opened this issue Dec 19, 2024 · 2 comments
Open

Comments

@comsyspro
Copy link
Contributor

comsyspro commented Dec 19, 2024

Is your feature request related to a problem? Please describe.
I tested moonlight on a HyperV server and here the video stream is shown only after 10 to 20 seconds and in this time the window stays black for a while because before the spinner and window was set to invisible. So I ask if it is possible to let the loading spinner visible as long the video stream gets recieved. In the code the connectionStarted() will set the stageSpinner.visible = false and window.visible = false

stageSpinner.visible = false

And here is a line which detetcs video traffic.
https://github.com/moonlight-stream/moonlight-common-c/blob/8599b6042a4ba27749b0f94134dd614b4328a9bc/src/VideoStream.c#L151

Describe the solution you'd like
Let the spinner rotate until video traffic is recieved.

@cgutman
Copy link
Member

cgutman commented Dec 20, 2024

Unfortunately it's more complicated than this. Moonlight is actually using 2 separate windows for the UI (managed by Qt) and for the stream (managed by SDL). Leaving the spinner visible won't help on its own because the entire UI window is hidden when the stream window is created.

It might be possible to keep the UI window visible while the stream window is hidden until the first frame is drawn, but I'm not sure it would work on all platforms (particularly embedded platforms without a window manager).

@comsyspro
Copy link
Contributor Author

comsyspro commented Dec 21, 2024

Probably an idea would be to write a file or registry key when the video first stream was recieved. Then in Qt a timer should run which is looking for this file or registry key and when found it set the Qt to not visible. And when a connection / video stream disconnects the registry key or file will be deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants