EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
dyaeger543
New Cone
New Cone
Posts: 8
Joined: 23 Nov 2020 17:32

EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Postby dyaeger543 » 22 Feb 2021 16:42

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

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Postby sherington » 25 Feb 2021 11:38

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

dyaeger543
New Cone
New Cone
Posts: 8
Joined: 23 Nov 2020 17:32

Re: EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Postby dyaeger543 » 01 Mar 2021 20:56

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.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: EmbeddedMediaPlayer Won't Allow Warning/Error Dialogs

Postby sherington » 07 Mar 2021 18:41

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.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 11 guests