     public var mediaDuration: Double = 0 {
         didSet {
             needsLayout = true
+
+            let widestTimestampString = attributedString(for: mediaDuration, ofSize: Metrics.timePreviewTextSize)
+            maxTimestampWidth = widestTimestampString.size().width + Metrics.timePreviewXOffset
         }
     }
 

        static let annotationDragThresholdHorizontal: CGFloat = 6
        static let textSize: CGFloat = 14.0
        static let timePreviewTextSize: CGFloat = 18.0
        static let timePreviewXOffset: CGFloat = 65.0
        static let timePreviewYOffset: CGFloat = -31.0
    }


    // MARK: - Private API

    private var annotationWindowController: PUIAnnotationWindowController?

    private var maxTimestampWidth: CGFloat = Metrics.timePreviewXOffset

    weak var viewDelegate: PUITimelineViewDelegate?

