Commit ea5cbee1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

ATV discovery: add basic playback (without subtitles lookup)

parent 987c2f76
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#import "VLCServerBrowsingTVTableViewController.h" #import "VLCServerBrowsingTVTableViewController.h"
#import "VLCServerBrowsingTVCell.h" #import "VLCServerBrowsingTVCell.h"
#import "VLCPlayerDisplayController.h"
#import "VLCPlaybackController.h"
@interface VLCServerBrowsingTVTableViewController () @interface VLCServerBrowsingTVTableViewController ()
@property (nonatomic, readonly) id<VLCNetworkServerBrowser>serverBrowser; @property (nonatomic, readonly) id<VLCNetworkServerBrowser>serverBrowser;
...@@ -145,11 +147,18 @@ ...@@ -145,11 +147,18 @@
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
id<VLCNetworkServerBrowserItem> item = self.serverBrowser.items[indexPath.row]; NSInteger row = indexPath.row;
id<VLCNetworkServerBrowserItem> item = self.serverBrowser.items[row];
if (item.isContainer) { if (item.isContainer) {
VLCServerBrowsingTVTableViewController *browsingViewController = [[VLCServerBrowsingTVTableViewController alloc] initWithServerBrowser:[item containerBrowser]]; VLCServerBrowsingTVTableViewController *browsingViewController = [[VLCServerBrowsingTVTableViewController alloc] initWithServerBrowser:[item containerBrowser]];
[self showViewController:browsingViewController sender:nil]; [self showViewController:browsingViewController sender:nil];
} else {
[VLCPlayerDisplayController sharedInstance].displayMode = VLCPlayerDisplayControllerDisplayModeFullscreen;
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
VLCMediaList *mediaList = self.serverBrowser.mediaList;
[vpc playMediaList:mediaList firstIndex:row];
} }
} }
......
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