         }
       }
     }
+    
+    if !isPreroll {
+      self.adDidFinishPlaying()
+    }
+    
     contentPlayer.addPeriodicTimeObserver(forInterval: CMTime(value: 1, timescale: 1), queue: .main) { _ in
       self.linearAdCountDown.isHidden = true
       guard let nearestLinear = linearTimes.filter({ $0.timeValue > self.contentPlayer.currentTime()}).first else {

        self.linearAdCountDown.text = "Ad Starts in \(Int(countDown))s"
      }
    }

    return contentPlayer.addBoundaryTimeObserver(forTimes: times, queue: .main) {
      let interval = Int(CMTimeGetSeconds(self.contentPlayer.currentTime()))
      guard


@objc public class AdsManager: NSObject {
  public static var apiKey: String?
  public static var iTunesId: String?
  public static var debug = false
  public static var current: AdsManager?
  public var instreamOffset: CGFloat = 0 {
