Activity monitor replaced by video on XCODE 10

I want to replace activity monitor(animation) with .mov video(instead of animation) that plays before loading the app, and while other tabs are also being loaded

Tried the method of "import AVFountdation" and "AVKit" but I am new to XCODE I cant figure out how to do it properly - I can play Video

I also have managed to use "activity monitor" - works fine while website loads, now i want to merge both code together i get the below code for reference.

CODE

import UIKit
import WebKit
import AVFoundation
import AVKit

class ViewController: UIViewController {

    @IBOutlet weak var videoView: UIView! /* I want to play as my "activity monitor" - instead of the circle loading animation
    @IBOutlet weak var webView: WKWebView! /* when this loads video will "hide"

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.

        setupView()

    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Do any resources that can be recreated.

        let url = "https://apple.com"
        let request = URLRequest(url: URL(string: url)!)
        self.webView.load(request)

        self.webView.addObserver(self, forKeyPath: #keyPath(WKWebView.isLoading), options: .new, context: nil)

    }

    override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {

        if keyPath == "loading" {

            if webView.isLoading {

                activityIndicator.startAnimating()
                activityIndicator.isHidden = false

            }else {

                activityIndicator.stopAnimating()
                activityIndicator.isHidden = true


     if webView.isLoading {

                private func setupView() {
            let path = URL(fileURLWithPath: Bundle.main.path(forResource: "quicksilverhd", ofType: "mov")!)
            let player = AVPlayer(url: path)

            let newLayer = AVPlayerLayer(player: player)
            newLayer.frame = self.videoView.frame
            self.videoView.layer.addSublayer(newLayer)
            newLayer.videoGravity = AVLayerVideoGravity.resizeAspectFill

            player.play()
            player.actionAtItemEnd = AVPlayer.ActionAtItemEnd.none

            NotificationCenter.default.addObserver(self, selector: #selector(ViewController.videoPlayerDidPlayToEnd(_:)), name: NSNotification.Name(rawValue: "AVPlayerItemDidPlayToEndTimeNotification"), object: player.currentItem)

        }

        @objc func videoPlayerDidPlayToEnd(_ notification: Notification) {
            let player: AVPlayerItem = notification.object as! AVPlayerItem
            player.seek(to: CMTime.zero)

            player.play.isHidden = false

    }else {
            player.play.isHidden = true        }
    }
}