Page 1 of 1

EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Posted: 22 Feb 2021 16:42
by dyaeger543
I am currently using the latest VLCJ(4.7)/VLC(3.0.12) to play multiple network video streams inside of a Java application on Windows. I am using HTTPS/TLS to create the initial video streams, and have the certificates working well to create the connections. Everything is mostly working as expected.

However, when I need to swap/renew one of the SSL certificates for one of the out put streams, my embeddedMediaPlayer instance that was playing that stream would not play the stream. I then opened a VLC window using the VLC GUI, and attempted to connect to the same stream When I did that, I received a warning message telling me that the certificate for the host had changed, and that I would have to accept the certificate. That was fine, since I replaced the certificate myself, but the issue Is that I was not able to receive that message, or accept the new cert when using an embeddedMediaPlayer instance inside of my Java application.

Is there a setting/parameter/option that I might be missing that would allow those messages to be displayed when using embeddedMediaPlayer?

Thanks!

Dan Y

Re: EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Posted: 25 Feb 2021 11:38
by sherington
The MediaPlayerFactory has a dialogs API for exactly this purpose.

LibVLC will call you back when it needs to display a dialog, but then it's up to you to display a dialog or whatever.

https://javadoc.io/static/uk.co.caprica ... gsApi.html

Re: EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Posted: 01 Mar 2021 20:56
by dyaeger543
The MediaPlayerFactory has a dialogs API for exactly this purpose.

LibVLC will call you back when it needs to display a dialog, but then it's up to you to display a dialog or whatever.

https://javadoc.io/static/uk.co.caprica ... gsApi.html
Thanks. I was able to figure it out, although the documentation is quite lacking. Plenty of trial and error to get the callbacks to work.

Is there a way to clear the accepted SSL exceptions done via VLC? I've tried completely uninstalling VLC (deleting preferences and cache, too), clearing the SSL state under Internet Options in Windows, and looking for the accepted certificate in the Windows cert manager. But I can't seem to get VLC to forget systems/certs that it accepted previously.

Re: EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Posted: 07 Mar 2021 18:41
by sherington
While documentation can always be better I don't agree in this case it's "quite lacking". vlcj even provides a simple example in its test sources showing how to use this dialog API.

Your follow-up question has no solution via the LibVLC API AFAIK.