     ///     - videoName: String name of video that you have added to your project.
     ///     - videoType: String type of the video. e.g. "mp4"
     ///     - isMuted: Bool indicating whether video is muted. Defaults to true.
-    ///     - aplha: CGFloat between 0 and 1. The higher the value, the darker
-    ///              the video. Defaults to 0.
-    ///     - willLoopVideo: Bool indicating whether video should restart when finished.
-    ///                      Defaults to true.
+    ///     - aplha: CGFloat between 0 and 1. The higher the value, the darker the video. Defaults to 0.
+    ///     - willLoopVideo: Bool indicating whether video should restart when finished. Defaults to true.
+    @available(*, deprecated, message: "Please use the new throwing APIs.")
     public func play(view: UIView,
                      videoName: String,
                      videoType: String,
                      isMuted: Bool = true,
                      alpha: CGFloat = 0,
                      willLoopVideo: Bool = true) {
-        guard let path = Bundle.main.path(forResource: videoName, ofType: videoType) else {
-            print("BackgroundVideo: [ERROR] could not find video")
+        do {
+            try play(
+                view: view,
+                videos: [VideoInfo(name: videoName, type: videoType)],
+                isMuted: isMuted,
+                alpha: alpha,
+                willLoopVideo: willLoopVideo
+            )
+        } catch {
+            print("Could not find \(videoName).\(videoType).")
+        }
+    }
+
+    public func play(view: UIView,
+                     name: String,
+                     type: String,
+                     isMuted: Bool = true,
+                     alpha: CGFloat = 0,
+                     willLoopVideo: Bool = true) throws {
+        try play(
+            view: view,
+            videos: [VideoInfo(name: name, type: type)],
+            isMuted: isMuted,
+            alpha: alpha,
+            willLoopVideo: willLoopVideo
+        )
+    }
+
+    public func play(view: UIView,
+                     videos: [VideoInfo],
+                     isMuted: Bool = true,
+                     alpha: CGFloat = 0,
+                     willLoopVideo: Bool = true) throws {
+        cleanUp()
+
+        guard !videos.isEmpty else {
             return
         }
 
-        let url = URL(fileURLWithPath: path)
-        player = AVPlayer(url: url)
-        player.actionAtItemEnd = .none
+        playerItems = try makeAVPlayerItems(videos)
+
+        if playerItems.count > 1 {
+            if willLoopVideo {
+                playerItems.forEach { [weak self] in
+                    let observer = NotificationCenter.default.addObserver(
+                        forName: .AVPlayerItemDidPlayToEndTime,
+                        object: $0,
+                        queue: .main) { notification in
+                            if let currentItem = notification.object as? AVPlayerItem {
+                                currentItem.seek(to: kCMTimeZero, completionHandler: nil)
+                                self?.player.advanceToNextItem()
+                                self?.player.insert(currentItem, after: nil)
+                            }
+                    }
+                    self?.playerItemDidPlayToEndObservers.append(observer)
+                }
+            }
+        } else {
+            self.willLoopVideo = willLoopVideo
+            setPlayerItemDidPlayToEndObserver()
+        }
+
+        player = AVQueuePlayer(items: playerItems)
+        player.actionAtItemEnd = playerItems.count == 1 ? .none : .advance
         player.isMuted = isMuted
         player.play()
 

import AVFoundation
import UIKit

/// Class that plays a video on a UIView.
public class VideoBackground {
    private lazy var player = AVPlayer()

    private lazy var layer = AVPlayerLayer()

    private lazy var overlayView = UIView()

    private var applicationWillEnterForegroundObserver: NSObjectProtocol?

    private var videoEndedObserver: NSObjectProtocol?

    private var viewBoundsObserver: NSKeyValueObservation?

    private var willLoopVideo = true

    /// Initializes a VideoBackground instance.
    public init() {

                self?.player.play()
        }

        // Restart a single video when it ends
        setPlayerItemDidPlayToEndObserver()
    }

    private func setPlayerItemDidPlayToEndObserver() {
        playerItemDidPlayToEndObserver = NotificationCenter.default.addObserver(
            forName: .AVPlayerItemDidPlayToEndTime,
            object: player.currentItem,
            queue: .main) { [weak self] _ in
