#import <React/RCTViewManager.h>
#import "RCTConvert+RNZoomVideoSdk.h"
#import "RNZoomBroadcastStreamingView.h"

@interface RNZoomBroadcastStreamingViewManager : RCTViewManager
@end

@implementation RNZoomBroadcastStreamingViewManager

RCT_EXPORT_MODULE(RNZoomBroadcastStreamingView)

- (UIView *)view
{
    return [[RNZoomBroadcastStreamingView alloc] init];
}

RCT_CUSTOM_VIEW_PROPERTY(videoResolution, NSString, RNZoomBroadcastStreamingView)
{
    if (json == nil || [json isKindOfClass:[NSNull class]]) {
        view.videoResolution = ZoomVideoSDKVideoResolution_720;
    } else {
        view.videoResolution = [RCTConvert ZoomVideoSDKVideoResolution:json];
    }
}

@end
