 import Cocoa
 import ScreenSaver
 import Dispatch
+import WebKit
 
 class JourneysScreensaverView: ScreenSaverView {
 
-    var image: NSImage?
+    var webView: WKWebView!
     
     override init?(frame: NSRect, isPreview: Bool) {
         super.init(frame: frame, isPreview: isPreview)
-        loadImage()
+        webView = WKWebView(frame: frame)
+        
+        let url = URL(string: "https://www.youtube.com/embed/1Z_YV_gwAro?version=3&autoplay=1&controls=0&disablekb=1&loop=1&modestbranding=1&showinfo=0&rel=0&hd=1")
+        let request = URLRequest(url: url!)
+        webView.load(request)
+        addSubview(webView)
     }
     
     required init?(coder: NSCoder) {

    }
    
    override func draw(_ rect: NSRect) {
        if let image = image {
            let point = CGPoint(x: (frame.size.width - image.size.width) / 2, y: (frame.size.height - image.size.height) / 2)
            image.draw(at: point, from: NSZeroRect, operation: .sourceOver, fraction: 1)
        }
    }
    
    override func animateOneFrame() {

    override func configureSheet() -> NSWindow? {
        return nil
    }
}
