     }
 
     private func handleLoadedTimeRangesEvent() {
-        guard let timeRange = player?.currentItem?.loadedTimeRanges.first?.timeRangeValue else {
-            return
-        }
-
+        guard let timeRange = player?.currentItem?.loadedTimeRanges.first?.timeRangeValue else { return }
         let info = [
             "start_position": CMTimeGetSeconds(timeRange.start),
             "end_position": CMTimeGetSeconds(CMTimeAdd(timeRange.start, timeRange.duration)),
             "duration": CMTimeGetSeconds(timeRange.duration),
             ]
-
         trigger(.didUpdateBuffer, userInfo: info)
     }
 

    }

    private func getSelectedMediaOptionWithCharacteristic(_ characteristic: AVMediaCharacteristic) -> AVMediaSelectionOption? {
        if let group = mediaSelectionGroup(characteristic) {
            return player?.currentItem?.selectedMediaOption(in: group)
        }
        return nil
    }

    private func mediaSelectionGroup(_ characteristic: AVMediaCharacteristic) -> AVMediaSelectionGroup? {

            let position = player?.currentItem?.currentTime().seconds {
            return position - start
        }
        guard playbackType == .vod, let player = player else { return 0 }
        return CMTimeGetSeconds(player.currentTime())
    }

    open override var playbackType: PlaybackType {
        guard let player = player, let duration = player.currentItem?.asset.duration else { return .unknown }
        return duration == CMTime.indefinite ? .live : .vod
    }

