VLC for iOS and SMB shares in a windows domain context
Posted: 11 Feb 2016 21:35
I just tried to connect to a share on a MS 2012 Server R2. But even though the credentials were correct, it just showed me the blank screen as depicted in other threads regarding the SMB module.
So, i think the culprit might be the following code:
It looks like it will force "workgroup" as the domain param, which will exclude alot of setups.
So am i missing something here? Or should this be fixed?
So, i think the culprit might be the following code:
Code: Select all
@implementation VLCNetworkServerBrowserVLCMedia (SMB)
+ (instancetype)SMBNetworkServerBrowserWithLogin:(VLCNetworkServerLoginInformation *)login
{
NSURLComponents *components = [[NSURLComponents alloc] init];
components.scheme = @"smb";
components.host = login.address;
components.port = login.port;
NSURL *url = components.URL;
return [self SMBNetworkServerBrowserWithURL:url
username:login.username
password:login.password
workgroup:nil];
}
+ (instancetype)SMBNetworkServerBrowserWithURL:(NSURL *)url username:(NSString *)username password:(NSString *)password workgroup:(NSString *)workgroup {
BOOL guestLogin = username.length == 0 && password.length == 0;
if (guestLogin) {
username = @"Guest";
password = @"";
}
VLCMedia *media = [VLCMedia mediaWithURL:url];
NSDictionary *mediaOptions = @{@"smb-user" : username ?: @"",
@"smb-pwd" : password ?: @"",
@"smb-domain" : workgroup?: @"WORKGROUP"};
[media addOptions:mediaOptions];
return [[self alloc] initWithMedia:media options:mediaOptions];
}
@end
So am i missing something here? Or should this be fixed?