//
//  ZZHExternalViewController.swift
//  SwiftProject
//
//  Created by aaa on 2024/3/27.
//

import Foundation
import UIKit
import AVKit

class ZZHExternalViewController: UIViewController {
    
    var imageView: UIImageView?
    var playerLayer:AVPlayerLayer?
    override func viewDidLoad() {
        super.viewDidLoad()
        print("ZZHExternalViewController viewDidLoad..")
        imageView = UIImageView()
        imageView?.image = UIImage(named: "loading")
        imageView?.contentMode = .scaleAspectFit
        self.view .addSubview(imageView!)
        imageView?.snp.makeConstraints({ make in
            make.left.top.right.bottom.equalTo(0)
        })
        
        
        playerLayer = AVPlayerLayer()
        playerLayer!.frame = self.view.bounds
        self.view.layer.addSublayer(playerLayer!)
        self.view.backgroundColor = .clear
    }
    
    override func viewWillLayoutSubviews() {
        super.viewWillLayoutSubviews()
        
        print("bounds:\(self.view.bounds)")
        print("frames:\(playerLayer!.frame)")
    }
}
