12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- /*****************************************************************************
- * 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 configureWithBetaIdentifier:@"0114ca8e265244ce588d2ebd035c3577"
- liveIdentifier:@"c95f4227dff96c61f8b3a46a25edc584"
- delegate:nil];
- // 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
|