authenticationlibvlclibvlcsharp

How do I check authentication while searching local media servers via libvlc or libvlcsharp


I'm now testing the local network feature of libvlcsharp.

I've checked the example here worked fine when listing different servers in the local network.

But I don't know if I missed something when opening some SMB servers that need certain authentications. They just showed empty folders and I didn't find any entry to provide the username or password information.

Are there some other examples that can show me the authentication part of libvlc or libvlcsharp? Thanks.


Solution

  • I see here that you can pass options specifically made for smb authentication, namely --smb-user, --smb-pwd and --smb-domain. You can pass them at the libvlc creation, or as media options (which sounds more logical) as :smb-user, :smb-pwd and :smb-domain respectively.

    If your login is interactive (shows a prompt when you open it with libvlc), you can also use the Dialog API. See this SO answer for an example