DocumentPicker converts to mp4 when necessary

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent 031e40d090
commit 8996741277

@ -2483,6 +2483,14 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
}
[dataSource setSourceFilename:filename];
// Although we want to be able to send higher quality attachments throught the document picker
// it's more imporant that we ensure the sent format is one all clients can accept (e.g. *not* quicktime .mov)
if ([SignalAttachment isInvalidVideoWithDataSource:dataSource dataUTI:type]) {
[self sendQualityAdjustedAttachmentForVideo:url filename:filename skipApprovalDialog:NO];
return;
}
// "Document picker" attachments _SHOULD NOT_ be resized, if possible.
SignalAttachment *attachment =
[SignalAttachment attachmentWithDataSource:dataSource dataUTI:type imageQuality:TSImageQualityOriginal];

@ -789,9 +789,6 @@ public class SignalAttachment: NSObject {
}
if !isInputVideoValidOutputVideo(dataSource: dataSource, dataUTI: dataUTI) {
// Most people won't hit this because we convert video when picked from the media picker
// But the current API allows sending videos that some Signal clients will not
// be able to view. (e.g. when picked from document picker)
owsFail("building video with invalid output, migrate to async API using compressVideoAsMp4")
}

Loading…
Cancel
Save