//
//  GlobalYouTubePlayerView.swift
//  TatvacareApp
//
//  Created by The Coding Studio on 27/06/25.
//

import UIKit
import WebKit

class WebViewController: UIViewController {
    var webView: WKWebView!
    var videoURL: URL?

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .white
        
        // Setup WebView
        let config = WKWebViewConfiguration()
        config.allowsInlineMediaPlayback = true
        
        webView = WKWebView(frame: view.bounds, configuration: config)
        webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        view.addSubview(webView)
        
        // Load video URL
        if let url = videoURL {
            let request = URLRequest(url: url)
            webView.load(request)
        }
    }
}
