Displaying RTSPClient errors in alerts on macOS
Hi. This is not an issue with VLCKit, as it is more me not being able to figure something out even after researching it a lot. I hope it's not too bad if I decided to post this question here.
When starting playback of a RTSP stream from an incorrect string, I've noticed this error message logged:
...Connection to server failed: Connection refused
It would be great for me to be able to display such messages to Users in macOS standard alerts, or even better to programatically process error messages and decide what to show and what to discard.
What I tried so far:
- I investigated
VLCMediaPlayerDelegatemethods, and especially
mediaPlayerStateChanged(_:), but I have not found a way to view errors there, only the player state when it changes (duh...).
- I discovered the
"--extraintf=macosx_dialog_provider"option and I tried to pass it, alone or with
"--verbose=4", but no alerts are ever displayed; my understanding was that this approach would have been the likelier to succeed, but nope.
- I dug into libvlc's
RTSPClientclass, where indeed the error quoted above, and others, are posted from, but for the love of the Saint protector of bad programmers I cannot find a way to access libvlc's errors (
mediaPlayer.libraryInstance, for instance, does not seem to have a method pertaining to errors).
I am clearly missing something... so I humbly ask: how do I access libvlc's errors from a VLCMediaPlayer object?