mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
MXKRoomDataSource: Handle video thumbnail generation with MXKVideoThumbnailGenerator.
This commit is contained in:
@@ -46,4 +46,20 @@
|
||||
*/
|
||||
- (Widget *)jitsiWidget;
|
||||
|
||||
/**
|
||||
Send an video to the room.
|
||||
Note: Move this method to MatrixKit when MatrixKit project will handle Swift module.
|
||||
|
||||
While sending, a fake event will be echoed in the messages list.
|
||||
Once complete, this local echo will be replaced by the event saved by the homeserver.
|
||||
|
||||
@param videoLocalURL the local filesystem path of the video to send.
|
||||
@param success A block object called when the operation succeeds. It returns
|
||||
the event id of the event generated on the homeserver
|
||||
@param failure A block object called when the operation fails.
|
||||
*/
|
||||
- (void)sendVideo:(NSURL*)videoLocalURL
|
||||
success:(void (^)(NSString *eventId))success
|
||||
failure:(void (^)(NSError *error))failure;
|
||||
|
||||
@end
|
||||
|
||||
@@ -555,6 +555,14 @@
|
||||
return jitsiWidget;
|
||||
}
|
||||
|
||||
- (void)sendVideo:(NSURL*)videoLocalURL
|
||||
success:(void (^)(NSString *eventId))success
|
||||
failure:(void (^)(NSError *error))failure
|
||||
{
|
||||
UIImage *videoThumbnail = [MXKVideoThumbnailGenerator.shared generateThumbnailFrom:videoLocalURL];
|
||||
[self sendVideo:videoLocalURL withThumbnail:videoThumbnail success:success failure:failure];
|
||||
}
|
||||
|
||||
#pragma mark - BubbleReactionsViewModelDelegate
|
||||
|
||||
- (void)bubbleReactionsViewModel:(BubbleReactionsViewModel *)viewModel didAddReaction:(MXReactionCount *)reactionCount forEventId:(NSString *)eventId
|
||||
|
||||
Reference in New Issue
Block a user