Commit ba9b708b authored by Alexandre Lision's avatar Alexandre Lision

call: allow image streaming

allow user to drag and drop or select an image from the file chooser and
stream it to a call

Issue: #78547
Change-Id: I21e73d11e143b3eb13105368ebd757427e6645cb
parent f7e1114b
......@@ -89,7 +89,9 @@
// Check if the pasteboard contains image data and source/user wants it copied
if ( [sender draggingSourceOperationMask] & NSDragOperationCopy &&
(UTTypeConformsTo(fileUTI, kUTTypeVideo)) || (UTTypeConformsTo(fileUTI, kUTTypeMovie))) {
(UTTypeConformsTo(fileUTI, kUTTypeVideo)) ||
(UTTypeConformsTo(fileUTI, kUTTypeMovie)) ||
(UTTypeConformsTo(fileUTI, kUTTypeImage))) {
//highlight our drop zone
......@@ -155,7 +157,9 @@
CFStringRef fileExtension = (__bridge CFStringRef) [fileURL.path pathExtension];
CFStringRef fileUTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, fileExtension, NULL);
BOOL conforms = (UTTypeConformsTo(fileUTI, kUTTypeVideo)) || (UTTypeConformsTo(fileUTI, kUTTypeMovie));
BOOL conforms = (UTTypeConformsTo(fileUTI, kUTTypeVideo)) ||
(UTTypeConformsTo(fileUTI, kUTTypeMovie)) ||
UTTypeConformsTo(fileUTI, kUTTypeImage);
//check to see if we can accept the data
return conforms;
......@@ -241,6 +245,7 @@
NSMutableArray* fileTypes = [NSMutableArray array];
[fileTypes addObject:(__bridge NSString *)kUTTypeVideo];
[fileTypes addObject:(__bridge NSString *)kUTTypeMovie];
[fileTypes addObject:(__bridge NSString *)kUTTypeImage];
[browsePanel setAllowedFileTypes:fileTypes];
[browsePanel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment