Skip to content

Commit

Permalink
Tweaks to streaming view
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisballinger committed May 15, 2013
1 parent 5d2f950 commit 37e377f
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 16 deletions.
Binary file added Media/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 16 additions & 8 deletions OpenWatch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@
D99741A11651DB0B0034ABB0 /* OWSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D99741A01651DB0B0034ABB0 /* OWSettingsViewController.m */; };
D9A6D9D51731D03400C1488A /* BSKeyboardControls.m in Sources */ = {isa = PBXBuildFile; fileRef = D9A6D9D11731D03400C1488A /* BSKeyboardControls.m */; };
D9A6D9D61731D03400C1488A /* BSKeyboardControls.strings in Resources */ = {isa = PBXBuildFile; fileRef = D9A6D9D21731D03400C1488A /* BSKeyboardControls.strings */; };
D9B4E80A17440B20006B3793 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D9B4E80817440B20006B3793 /* [email protected] */; };
D9B4E80D17441759006B3793 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D9B4E80C17441759006B3793 /* [email protected] */; };
D9B4E81317442E16006B3793 /* icon-iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = D9B4E81217442E16006B3793 /* icon-iphone.png */; };
D9B4E81517442E1A006B3793 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D9B4E81417442E1A006B3793 /* [email protected] */; };
D9BECF0016B20E01009046E1 /* navbar.png in Resources */ = {isa = PBXBuildFile; fileRef = D9BECEFE16B20E01009046E1 /* navbar.png */; };
D9BECF0116B20E01009046E1 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D9BECEFF16B20E01009046E1 /* [email protected] */; };
D9BECF9816B22B06009046E1 /* UINavigationBar+DropShadow.m in Sources */ = {isa = PBXBuildFile; fileRef = D9BECF9716B22B06009046E1 /* UINavigationBar+DropShadow.m */; };
Expand Down Expand Up @@ -263,10 +267,6 @@
D9E42C6017417DB800CA524F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9E42C5F17417DB800CA524F /* CoreText.framework */; };
D9E72E2C167BC6FF00C6CB75 /* thumbnail_placeholder.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E72E2A167BC6FE00C6CB75 /* thumbnail_placeholder.png */; };
D9E72E2D167BC6FF00C6CB75 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D9E72E2B167BC6FE00C6CB75 /* [email protected] */; };
D9E72E4C167FB0EE00C6CB75 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E72E4B167FB0EE00C6CB75 /* icon.png */; };
D9E72E4F167FB0F700C6CB75 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D9E72E4E167FB0F700C6CB75 /* [email protected] */; };
D9E72E51167FB10000C6CB75 /* icon-ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E72E50167FB10000C6CB75 /* icon-ipad.png */; };
D9E72E53167FB10500C6CB75 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = D9E72E52167FB10500C6CB75 /* [email protected] */; };
D9E72E5A167FF6AE00C6CB75 /* OWLocalMediaEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D9E72E59167FF6AD00C6CB75 /* OWLocalMediaEditViewController.m */; };
D9EB4C3C166D314C0019F8B6 /* MagicalImportFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = D9EB4C04166D314C0019F8B6 /* MagicalImportFunctions.m */; };
D9EB4C3D166D314C0019F8B6 /* NSAttributeDescription+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = D9EB4C06166D314C0019F8B6 /* NSAttributeDescription+MagicalDataImport.m */; };
Expand Down Expand Up @@ -594,6 +594,10 @@
D9A6D9D11731D03400C1488A /* BSKeyboardControls.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BSKeyboardControls.m; sourceTree = "<group>"; };
D9A6D9D31731D03400C1488A /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/BSKeyboardControls.strings; sourceTree = "<group>"; };
D9A6D9D41731D03400C1488A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/BSKeyboardControls.strings; sourceTree = "<group>"; };
D9B4E80817440B20006B3793 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D9B4E80C17441759006B3793 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D9B4E81217442E16006B3793 /* icon-iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-iphone.png"; sourceTree = "<group>"; };
D9B4E81417442E1A006B3793 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D9BECEFE16B20E01009046E1 /* navbar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navbar.png; sourceTree = "<group>"; };
D9BECEFF16B20E01009046E1 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
D9BECF9616B22B06009046E1 /* UINavigationBar+DropShadow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationBar+DropShadow.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1122,6 +1126,8 @@
D99741661651D42E0034ABB0 = {
isa = PBXGroup;
children = (
D9B4E81417442E1A006B3793 /* [email protected] */,
D9B4E81217442E16006B3793 /* icon-iphone.png */,
D9DFADF716547DE7003C515C /* Media */,
D997417B1651D42F0034ABB0 /* OpenWatch */,
D9D2E1501652EA8A0000E7C5 /* Submodules */,
Expand Down Expand Up @@ -1515,6 +1521,8 @@
D9DFADF716547DE7003C515C /* Media */ = {
isa = PBXGroup;
children = (
D9B4E80C17441759006B3793 /* [email protected] */,
D9B4E80817440B20006B3793 /* [email protected] */,
D909C2DB1742BB55005930A7 /* [email protected] */,
D909C2DC1742BB55005930A7 /* [email protected] */,
D93936C51741A5620070E164 /* [email protected] */,
Expand Down Expand Up @@ -1894,10 +1902,6 @@
D94A26F4167A858600BD36EF /* [email protected] in Resources */,
D9E72E2C167BC6FF00C6CB75 /* thumbnail_placeholder.png in Resources */,
D9E72E2D167BC6FF00C6CB75 /* [email protected] in Resources */,
D9E72E4C167FB0EE00C6CB75 /* icon.png in Resources */,
D9E72E4F167FB0F700C6CB75 /* [email protected] in Resources */,
D9E72E51167FB10000C6CB75 /* icon-ipad.png in Resources */,
D9E72E53167FB10500C6CB75 /* [email protected] in Resources */,
D9E226F516A5E32A00F06C31 /* BrowserViewController.xib in Resources */,
D9E226F616A5E32A00F06C31 /* left.png in Resources */,
D9E226F716A5E32A00F06C31 /* [email protected] in Resources */,
Expand Down Expand Up @@ -1971,6 +1975,10 @@
D909C30E1742CEA4005930A7 /* [email protected] in Resources */,
D909C30F1742CEA4005930A7 /* uv_x.png in Resources */,
D909C3101742CEA4005930A7 /* [email protected] in Resources */,
D9B4E80A17440B20006B3793 /* [email protected] in Resources */,
D9B4E80D17441759006B3793 /* [email protected] in Resources */,
D9B4E81317442E16006B3793 /* icon-iphone.png in Resources */,
D9B4E81517442E1A006B3793 /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
4 changes: 3 additions & 1 deletion OpenWatch/OWCaptureViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "OWVideoProcessor.h"
#import "OWTimerView.h"
#import "OWRecordingActivityIndicatorView.h"
#import "BButton.h"

@class AVCaptureVideoPreviewLayer, OWCaptureViewController;

Expand All @@ -26,8 +27,9 @@
@property (nonatomic, weak) id<OWCaptureDelegate> delegate;
@property (nonatomic, strong) OWTimerView *timerView;
@property (nonatomic, strong) OWRecordingActivityIndicatorView *recordingIndicator;
@property (nonatomic, strong) UILabel *uploadStatusLabel;

@property (nonatomic, strong) UIButton *recordButton;
@property (nonatomic, strong) BButton *recordButton;
@property (nonatomic, strong) OWVideoProcessor *videoProcessor;
@property (nonatomic, strong) UIView *videoPreviewView;
@property (nonatomic, strong) AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;
Expand Down
21 changes: 17 additions & 4 deletions OpenWatch/OWCaptureViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ @interface OWCaptureViewController ()
@end

@implementation OWCaptureViewController
@synthesize videoPreviewView, captureVideoPreviewLayer, videoProcessor, recordButton, recordingIndicator, timerView, delegate;
@synthesize videoPreviewView, captureVideoPreviewLayer, videoProcessor, recordButton, recordingIndicator, timerView, delegate, uploadStatusLabel;

- (id) init {
if (self = [super init]) {
Expand All @@ -30,18 +30,22 @@ - (id) init {
[self setupRecordButton];
self.recordingIndicator = [[OWRecordingActivityIndicatorView alloc] init];
self.timerView = [[OWTimerView alloc] init];
self.uploadStatusLabel = [[UILabel alloc] init];
[OWUtilities styleLabel:uploadStatusLabel];
self.uploadStatusLabel.text = @"Streaming...";
self.uploadStatusLabel.textAlignment = NSTextAlignmentRight;
}
return self;
}

- (void) setupRecordButton {
self.recordButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
self.recordButton = [[BButton alloc] initWithFrame:CGRectZero type:BButtonTypeDanger];
self.recordButton.layer.opacity = 0.7;
//recordButton.transform = CGAffineTransformMakeRotation(M_PI / 2);
[recordButton setTitle:RECORD_STRING forState:UIControlStateNormal];
self.recordButton.tintColor = [OWUtilities doneButtonColor];
[self.recordButton addTarget:self action:@selector(recordButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
//self.recordButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleBottomMargin;
//self.recordButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin;
}

- (void) loadView {
Expand All @@ -52,6 +56,7 @@ - (void) loadView {
[self.view addSubview:recordButton];
[self.view addSubview:recordingIndicator];
[self.view addSubview:timerView];
[self.view addSubview:uploadStatusLabel];
}

- (void) recordButtonPressed:(id)sender {
Expand Down Expand Up @@ -95,8 +100,16 @@ - (void) viewWillAppear:(BOOL)animated {
CGFloat buttonWidth = 100.0f;
CGFloat buttonHeight = 45.0f;
CGFloat padding = 10.0f;
self.recordButton.frame = CGRectMake(self.view.frame.size.width - buttonWidth - padding, padding, buttonWidth, buttonHeight);
CGFloat labelWidth = 100.0f;
CGFloat labelHeight = 30.0f;

CGFloat frameWidth = self.view.frame.size.height;
CGFloat frameHeight = self.view.frame.size.width;

self.uploadStatusLabel.frame = CGRectMake(frameWidth - labelWidth - padding, padding, labelWidth, labelHeight);
self.recordingIndicator.frame = CGRectMake(padding, padding, 35, 35);
self.recordButton.frame = CGRectMake(frameWidth - buttonWidth - padding, frameHeight - buttonHeight - padding, buttonWidth, buttonHeight);

self.timerView.frame = CGRectMake([OWUtilities rightOfView:recordingIndicator], padding, 100, 35);
[captureVideoPreviewLayer setFrame:self.view.bounds];
}
Expand Down
2 changes: 1 addition & 1 deletion OpenWatch/OWUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ + (NSString*) websiteBaseURLString {
}

+ (NSString*) apiBaseURLString {
return @"https://staging.openwatch.net/";
return @"https://openwatch.net/";
//return @"http://10.0.1.26:8000/";
//return @"http://192.168.43.122:8000/";
}
Expand Down
10 changes: 8 additions & 2 deletions OpenWatch/OpenWatch-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon.png</string>
<string>icon@2x.png</string>
<string>57.png</string>
<string>114.png</string>
<string>icon-ipad.png</string>
<string>[email protected]</string>
<string>icon-iphone.png</string>
<string>[email protected]</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
Expand Down Expand Up @@ -56,6 +60,8 @@
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>location-services</string>
Expand Down
Binary file removed icon-ipad.png
Binary file not shown.
Binary file removed [email protected]
Binary file not shown.
Binary file added icon-iphone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed icon.png
Binary file not shown.
Binary file removed [email protected]
Binary file not shown.

0 comments on commit 37e377f

Please sign in to comment.