1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- /*****************************************************************************
- * VLC for iOS
- *****************************************************************************
- * Copyright (c) 2015 VideoLAN. All rights reserved.
- * $Id$
- *
- * Authors: Felix Paul Kühne <fkuehne # videolan.org>
- *
- * Refer to the COPYING file of the official project for license.
- *****************************************************************************/
- #import "AppleTVAppDelegate.h"
- #import "VLCServerListTVViewController.h"
- #import "VLCOpenNetworkStreamTVViewController.h"
- #import "VLCSettingsViewController.h"
- #import "VLCCloudServicesTVViewController.h"
- #import "VLCHTTPUploaderController.h"
- #import "VLCRemotePlaybackViewController.h"
- #import "HockeySDK.h"
- @interface AppleTVAppDelegate ()
- {
- UITabBarController *_mainViewController;
- VLCServerListTVViewController *_localNetworkVC;
- VLCCloudServicesTVViewController *_cloudServicesVC;
- VLCRemotePlaybackViewController *_remotePlaybackVC;
- VLCOpenNetworkStreamTVViewController *_openNetworkVC;
- VLCSettingsViewController *_settingsVC;
- }
- @end
- @implementation AppleTVAppDelegate
- + (void)initialize
- {
- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSDictionary *appDefaults = @{kVLCSettingContinueAudioInBackgroundKey : @(YES),
- kVLCSettingStretchAudio : @(NO),
- kVLCSettingTextEncoding : kVLCSettingTextEncodingDefaultValue,
- kVLCSettingSkipLoopFilter : kVLCSettingSkipLoopFilterNonRef,
- kVLCSettingSubtitlesFont : kVLCSettingSubtitlesFontDefaultValue,
- kVLCSettingSubtitlesFontColor : kVLCSettingSubtitlesFontColorDefaultValue,
- kVLCSettingSubtitlesFontSize : kVLCSettingSubtitlesFontSizeDefaultValue,
- kVLCSettingSubtitlesBoldFont: kVLCSettingSubtitlesBoldFontDefaultValue,
- kVLCSettingDeinterlace : kVLCSettingDeinterlaceDefaultValue,
- kVLCSettingNetworkCaching : kVLCSettingNetworkCachingDefaultValue,
- kVLCSettingEqualizerProfile : kVLCSettingEqualizerProfileDefaultValue,
- kVLCSettingPlaybackForwardSkipLength : kVLCSettingPlaybackForwardSkipLengthDefaultValue,
- kVLCSettingPlaybackBackwardSkipLength : kVLCSettingPlaybackBackwardSkipLengthDefaultValue,
- kVLCSettingFTPTextEncoding : kVLCSettingFTPTextEncodingDefaultValue,
- kVLCSettingWiFiSharingIPv6 : kVLCSettingWiFiSharingIPv6DefaultValue};
- [defaults registerDefaults:appDefaults];
- }
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- {
- BITHockeyManager *hockeyManager = [BITHockeyManager sharedHockeyManager];
- [hockeyManager configureWithIdentifier:@"f8697706993b44bba1c03cb7016cc325"];
- // Configure the SDK in here only!
- [hockeyManager startManager];
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- _localNetworkVC = [[VLCServerListTVViewController alloc] initWithNibName:nil bundle:nil];
- _cloudServicesVC = [[VLCCloudServicesTVViewController alloc] initWithNibName:nil bundle:nil];
- _remotePlaybackVC = [[VLCRemotePlaybackViewController alloc] initWithNibName:nil bundle:nil];
- _openNetworkVC = [[VLCOpenNetworkStreamTVViewController alloc] initWithNibName:nil bundle:nil];
- _settingsVC = [[VLCSettingsViewController alloc] initWithNibName:nil bundle:nil];
- _mainViewController = [[UITabBarController alloc] init];
- _mainViewController.tabBar.barTintColor = [UIColor VLCOrangeTintColor];
- _mainViewController.viewControllers = @[[[UINavigationController alloc] initWithRootViewController:_localNetworkVC],
- [[UINavigationController alloc] initWithRootViewController:_cloudServicesVC],
- [[UINavigationController alloc] initWithRootViewController:_remotePlaybackVC],
- [[UINavigationController alloc] initWithRootViewController:_openNetworkVC],
- [[UINavigationController alloc] initWithRootViewController:_settingsVC]];
- self.window.rootViewController = _mainViewController;
- // Init the HTTP Server
- [VLCHTTPUploaderController sharedInstance];
- [self.window makeKeyAndVisible];
- return YES;
- }
- @end
|