Commit 5f5c1398 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix playback of URLs send by the web interface

parent 2fc33cf8
......@@ -82,7 +82,7 @@
} else if ([type isEqualToString:@"seekTo"]) {
[self _respondToSeek:receivedDict];
} else if ([type isEqualToString:@"openURL"]) {
[self _respondToOpenURL:receivedDict];
[self performSelectorOnMainThread:@selector(_respondToOpenURL:) withObject:receivedDict waitUntilDone:NO];
} else if ([type isEqualToString:@"volume"]) {
[self sendMessage:@"VOLUME CONTROL NOT SUPPORTED ON THIS DEVICE"];
} else
......@@ -338,6 +338,20 @@
if (needsMediaList) {
[vpc playMediaList:mediaList firstIndex:0];
}
VLCFullscreenMovieTVViewController *movieVC = [VLCFullscreenMovieTVViewController fullscreenMovieTVViewController];
if (![movieVC isBeingPresented]) {
if ([[[UIApplication sharedApplication].delegate.window rootViewController] presentedViewController] != nil) {
[[[[UIApplication sharedApplication].delegate.window rootViewController] presentedViewController] presentViewController:movieVC
animated:NO
completion:nil];
} else {
[[[UIApplication sharedApplication].delegate.window rootViewController] presentViewController:movieVC
animated:NO
completion:nil];
}
}
}
@end
......@@ -393,7 +393,8 @@
NSString *relativePath = [filePath substringFromIndex:[documentRoot length]];
NSDictionary *replacementDict = @{@"WEBINTF_TITLE" : NSLocalizedString(@"WEBINTF_TITLE_ATV", nil),
@"WEBINTF_DROPFILES" : NSLocalizedString(@"WEBINTF_DROPFILES", nil),
@"WEBINTF_DROPFILES_LONG" : [NSString stringWithFormat:NSLocalizedString(@"WEBINTF_DROPFILES_LONG_ATV", nil), deviceModel]};
@"WEBINTF_DROPFILES_LONG" : [NSString stringWithFormat:NSLocalizedString(@"WEBINTF_DROPFILES_LONG_ATV", nil), deviceModel],
@"WEBINTF_OPEN_URL" : NSLocalizedString(@"ENTER_URL", nil)};
HTTPDynamicFileResponse *fileResponse;
if ([relativePath isEqualToString:@"/index.html"]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment