-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use fileCDN with video attachments #624
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for your contribution! Looks good, but we just need to adjust the VideoPreviewLoader
, so it doesn't have breaking changes (check the comment).
@@ -34,31 +34,43 @@ public final class DefaultVideoPreviewLoader: VideoPreviewLoader { | |||
NotificationCenter.default.removeObserver(self) | |||
} | |||
|
|||
public func loadPreviewForVideo(at url: URL, completion: @escaping (Result<UIImage, Error>) -> Void) { | |||
public func loadPreviewForVideo(at url: URL, fileCDN: FileCDN, completion: @escaping (Result<UIImage, Error>) -> Void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be a breaking change - can you instead inject the FileCDN
via our DI mechanism? (@Injected
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, will get it updated. Thanks for the prompt reviews!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! ✅
95ea66f
to
00fd3b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me ✅
🔗 Issue Link
Jira or Github issue link, if applicable.
🎯 Goal
We need a way for all attachment URL's to be intercepted and adjusted/signed.
🛠 Implementation
This update adds FileCDN handling to all video attachment touch points primarily via the:
VideoPreviewLoader
for thumbnailsStreamVideoPlayer
andVideoPlayerView
Also make a few style & comment clean ups from previous FileCDN PR.
🧪 Testing
Added basic tests
🎨 Changes
Add relevant screenshots or videos showcasing the changes.
☑️ Checklist