mirror of
https://github.com/expo/gl-react-native.git
synced 2026-11-15 17:34:35 -10:00
- format: "base64" || "file" - type: "png" || "jpeg"/"jpg" || "webm" (android only) - quality: from 0 to 1 (iOS support only with type=jpg/jpeg) - filePath: for format=="file" you must provide a file path (you can use react-native-fs to get directory constants)
23 lines
508 B
Objective-C
23 lines
508 B
Objective-C
//
|
|
// RCTConvert+CaptureConfig.m
|
|
// RNGL
|
|
//
|
|
// Created by Gaetan Renaudeau on 30/12/15.
|
|
//
|
|
//
|
|
|
|
#import "RCTConvert+CaptureConfig.h"
|
|
|
|
@implementation RCTConvert (CaptureConfig)
|
|
|
|
+ (CaptureConfig *)CaptureConfig:(id)json
|
|
{
|
|
return [[CaptureConfig alloc]
|
|
initWithFormat:[RCTConvert NSString:json[@"format"]]
|
|
withType:[RCTConvert NSString:json[@"type"]]
|
|
withQuality:[RCTConvert NSNumber:json[@"quality"]]
|
|
withFilePath:[RCTConvert NSString:json[@"filePath"]]];
|
|
}
|
|
|
|
@end
|