react-native-video/RCTVideoManager.m

27 lines
583 B
Mathematica
Raw Normal View History

2015-03-30 23:07:55 -06:00
#import "RCTVideoManager.h"
#import "RCTVideo.h"
#import "RCTBridge.h"
@import MediaPlayer;
@implementation RCTVideoManager
@synthesize bridge = _bridge;
- (UIView *)view
{
return [[RCTVideo alloc] init];
}
RCT_EXPORT_VIEW_PROPERTY(src, NSString);
RCT_EXPORT_VIEW_PROPERTY(resizeMode, NSInteger);
- (NSDictionary *)constantsToExport
{
return @{@"ScaleNone": @(MPMovieScalingModeNone),
@"ScaleToFill": @(MPMovieScalingModeFill),
@"ScaleAspectFit": @(MPMovieScalingModeAspectFit),
@"ScaleAspectFill": @(MPMovieScalingModeAspectFill)};
}
@end