import UIKit

fileprivate let instreamBaseViewControllerNibName = "InstreamBaseViewController"

/// Base controller for video in-stream integration cases, provides instream view and play button
class InstreamBaseViewController: UIViewController {

    @IBOutlet weak var instreamView: UIView!
    @IBOutlet weak var playButton: UIButton!
    
    var adSize = CGSize(width: 300, height: 250)
    
    convenience init(adSize: CGSize) {
        self.init(nibName: instreamBaseViewControllerNibName, bundle: nil)
        self.adSize = adSize
    }
    
    convenience init() {
        self.init(nibName: instreamBaseViewControllerNibName, bundle: nil)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
         
        
        instreamView.constraints.first { $0.firstAttribute == .width }?.constant = adSize.width
        instreamView.constraints.first { $0.firstAttribute == .height }?.constant = adSize.height
    }
    
    @IBAction func onPlayButtonPressed(_ sender: AnyObject) {}
}
