RFR: 8264737: JavaFX media stream stops playing after reconnecting via Remote Desktop
Kevin Rushforth
kcr at openjdk.java.net
Mon Apr 26 18:44:38 UTC 2021
On Sat, 24 Apr 2021 02:23:19 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:
> Remote Desktop will change default audio device when connecting or disconnecting to it's own audio device. Also, when remote desktop is disconnect, then remote desktop default audio device is removed and system default device is not restored until user logs back to computer. So, after remote desktop is disconnected, then system left without any default audio devices.
>
> To fix this we will unload DirectSound when audio device is gone and will continue playback by throwing away audio data. Once we receive notification that default audio device is back, we will load it and continue playback via this device.
>
> Loading device done in loop, since it is not always available right after notification, but will be after very short period of time.
>
> Tested by connecting/disconnecting remote desktop and switching between remote and normal desktop. In second case audio will switch between remote or speakers.
>
> Since audio device is gone and not restored after disconnect, there will be no audio on machine local speakers, until user logs back again.
As a related data point, even if I don't disconnect while playing the initial media stream, if I do the following, there is no problem and I can hear the audio on reconnect:
1. Run Ensemble
2. Select the "Audio Area Chart"
3. Select the "Audio Bar Chart" sample
4. Disconnect from remote desktop
5. Reconnect to remote desktop
No problem.
-------------
PR: https://git.openjdk.java.net/jfx/pull/479
More information about the openjfx-dev
mailing list