Skip to content

Commit

Permalink
IOS-15890 Video conversion in progress should check 'viewable' status…
Browse files Browse the repository at this point in the history
… as well as 'success' for reps status
  • Loading branch information
jdizoglio committed Jun 13, 2018
1 parent f197844 commit 36d930a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions BoxContentSDK/BoxContentSDK/BOXContentSDKConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ extern NSString *const BOXRepresentationTemplateValueHLSManifest;
// Representation Status
typedef NSString BOXRepresentationStatus;
extern BOXRepresentationStatus *const BOXRepresentationStatusSuccess;
extern BOXRepresentationStatus *const BOXRepresentationStatusViewable;
extern BOXRepresentationStatus *const BOXRepresentationStatusPending;
extern BOXRepresentationStatus *const BOXRepresentationStatusNone;
extern BOXRepresentationStatus *const BOXRepresentationStatusError;
Expand Down
1 change: 1 addition & 0 deletions BoxContentSDK/BoxContentSDK/BOXContentSDKConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@

// Representation Status
BOXRepresentationStatus *const BOXRepresentationStatusSuccess = @"success";
BOXRepresentationStatus *const BOXRepresentationStatusViewable = @"viewable";
BOXRepresentationStatus *const BOXRepresentationStatusPending = @"pending";
BOXRepresentationStatus *const BOXRepresentationStatusNone = @"none";
BOXRepresentationStatus *const BOXRepresentationStatusError = @"error";
Expand Down
2 changes: 1 addition & 1 deletion BoxContentSDK/BoxContentSDK/Requests/BOXFileRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ - (NSString *)formatRepresentationRequestHeader
return nil;
}

__block NSString *representationFields = nil;
__block NSString *representationFields = @"";

if ([self.representationsRequested containsObject:@(BOXRepresentationRequestAllRepresentations)]) {
representationFields = @"[jpg?dimensions=320x320&paged=false][jpg?dimensions=1024x1024&paged=false][pdf,hls,mp4,mp3,jpg]";
Expand Down
6 changes: 1 addition & 5 deletions BoxContentSDK/BoxContentSDKTests/BOXFileRequestTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,7 @@ - (void)test_that_representation_options_are_set_correctly_when_request_is_perfo
// Check x-reps-hint header verify single rep in match option
[fileRequest setRepresentationRequestOptions:BOXRepresentationRequestHighDefinitionVideo, nil];
actualXRepsHint = [fileRequest formatRepresentationRequestHeader];
if ([UIDevice iOSVersion] > BOXiOSVersion10) {
expectedHeaderXRepsHint = [NSString stringWithFormat:@"[mp4]"];
} else {
expectedHeaderXRepsHint = [NSString stringWithFormat:@"[hls]"];
}
expectedHeaderXRepsHint = [NSString stringWithFormat:@"[hls]"];
XCTAssertEqualObjects(expectedHeaderXRepsHint, actualXRepsHint);

[fileRequest setRepresentationRequestOptions:BOXRepresentationRequestLargeThumbnailRepresentation, nil];
Expand Down

0 comments on commit 36d930a

Please sign in to comment.