#import "InstreamBaseViewController.h"

@interface InstreamBaseViewController ()

@end

@implementation InstreamBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.instreamView.constraints filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSLayoutConstraint*  _Nullable evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
        return evaluatedObject.firstAttribute == NSLayoutAttributeWidth;
    }]].firstObject.constant = self.adSize.width;
    
    [self.instreamView.constraints filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSLayoutConstraint*  _Nullable evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
        return evaluatedObject.firstAttribute == NSLayoutAttributeHeight;
    }]].firstObject.constant = self.adSize.height;
}

-(id)init {
    self = [super initWithNibName:@"InstreamBaseViewController" bundle:nil];
    self.adSize = CGSizeMake(300, 250);
    return self;
}

-(id)initWithAdSize:(CGSize)adSize {
    self = [super initWithNibName:@"InstreamBaseViewController" bundle:nil];
    self.adSize = adSize;
    return self;
}

- (IBAction)onPlayButtonPressed:(id)sender {
}

@end
