JDK-8264737 : JavaFX media stream stops playing after reconnecting via Remote Desktop
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 8,openjfx11,openjfx16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2021-04-05
  • Updated: 2021-08-19
  • Resolved: 2021-04-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u311Fixed openjfx11.0.13Fixed
Related Reports
Relates :  
Relates :  
Description
This is a follow-on bug to JDK-8239589.

To reproduce this:

1. Run any program that plays media (video and/or audio) on a Windows 10 remote desktop, for example, Ensemble8.
2. Disconnect from the remote desktop
3. Reconnect to the remote desktop

BUG: any media stream that was playing will no longer continue to play after reconnecting. 

Reloading the media stream works fine, as does playing a new media stream.

This bug happens even if the software pipeline is used, so is not in the graphics rendering code, and not directly related to JDK-8239589.
Comments
Changeset: 0a686130 Author: Alexander Matveev <almatvee@openjdk.org> Date: 2021-04-28 22:42:18 +0000 URL: https://git.openjdk.java.net/jfx/commit/0a6861304e142eed547f3c82b0d2e2a55f91b9b4
28-04-2021

I tested several Browser: Firefox: Continues to play video, but no audio after reconnect. Chrome: Continues to play video and audio works. Edge: Same as Chrome. I think first we should try to continue play video and audio after disconnect. It should be useful if app is used to play audio on headless system. If not possible, then pause/play. If play/pause not possible will resolve as won't fix.
20-04-2021

When you play a video in Firefox and then disconnect, it continues / resumes playing when you reconnect. That's an interesting finding about Windows Media Player. If it isn't possible to pause and resume the stream, then would it be possible to recreate the underlying stream and then seek to the last known position, and play from there? If not, then it does seem possible that we won't be able to fix it.
17-04-2021

What is expected behavior here? Windows Media Player also stops playing video in this case and does not resume it after remote desktop is connected. Also, I cannot restart playing video in Windows Media Player using play/pause button. As of JavaFX Media I am getting following error: onError: MediaException: PLAYBACK_HALTED : IDirectSoundBuffer_GetStatus (NULL), IDirectSoundBuffer_GetCurrentPosition: (NULL), dwStatus: 5 Once halted we need to recreate media player. I will try investigate if it would be possible to pause and resume video if remote desktop is disconnected. If not possible I think it is not a bug which we will fix.
17-04-2021

I suspect that something in DirectShow is causing this since: A) it happens with the software pipeline, which doesn't use any Direct3D rendering code; and B) it never happened when I was simulating the device removed events in the D3DPipeline, causing the code to go through all of the graphics pipeline reinitialization logic.
05-04-2021