         if progress.fractionCompleted >= 1 {
             timer.invalidate()
             attachment.progress = nil
-            if let videoAttachment = attachment as? VideoAttachment, let videoURL = progress.userInfo[ProgressUserInfoKey("videoURL")] as? URL {
+            if let videoAttachment = attachment as? VideoAttachment, let videoURL = progress.userInfo[MediaProgressKey.mediaID] as? URL {
                 videoAttachment.srcURL = videoURL
                 richTextView.update(attachment: videoAttachment)
             }

        static let headers              = [HeaderFormatter.HeaderType.none, .h1, .h2, .h3, .h4, .h5, .h6]
        static let margin               = CGFloat(20)
        static let moreAttachmentText   = "more"
    }
}



    @objc func timerFireMethod(_ timer: Timer) {
        guard let progress = timer.userInfo as? Progress,
              let imageId = progress.userInfo[MediaProgressKey.mediaID] as? String,
              let attachment = richTextView.attachment(withId: imageId)
        else {
            timer.invalidate()
