{"action":"closed","issue":{"url":"https://api.github.com/repos/layerhq/Atlas-iOS/issues/877","labels_url":"https://api.github.com/repos/layerhq/Atlas-iOS/issues/877/labels{/name}","comments_url":"https://api.github.com/repos/layerhq/Atlas-iOS/issues/877/comments","events_url":"https://api.github.com/repos/layerhq/Atlas-iOS/issues/877/events","html_url":"https://github.com/layerhq/Atlas-iOS/issues/877","id":92307305,"number":877,"title":"Sending video message support?","user":{"login":"huyduc","id":721399,"avatar_url":"https://avatars.githubusercontent.com/u/721399?v=3","gravatar_id":"","url":"https://api.github.com/users/huyduc","html_url":"https://github.com/huyduc","followers_url":"https://api.github.com/users/huyduc/followers","following_url":"https://api.github.com/users/huyduc/following{/other_user}","gists_url":"https://api.github.com/users/huyduc/gists{/gist_id}","starred_url":"https://api.github.com/users/huyduc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huyduc/subscriptions","organizations_url":"https://api.github.com/users/huyduc/orgs","repos_url":"https://api.github.com/users/huyduc/repos","events_url":"https://api.github.com/users/huyduc/events{/privacy}","received_events_url":"https://api.github.com/users/huyduc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-01T08:03:09Z","updated_at":"2015-07-02T18:48:59Z","closed_at":"2015-07-02T18:48:59Z","body":"Hi, \r\nWe're trying to create a chat application with capability to send video file. We're currently experiencing this crash.\r\n\r\n![screenshot 2015-07-01 12 48 07](https://cloud.githubusercontent.com/assets/721399/8450029/590a4aba-2009-11e5-87bc-161a9ff787d4.png)\r\n\r\nWe create the attachment using this ATLMediaAttachment class method\r\n\r\n```objective-c\r\n+ (instancetype)mediaAttachmentWithAssetURL:(NSURL *)assetURL thumbnailSize:(NSUInteger)thumbnailSize;\r\n```\r\n\r\nI suspect it's due to the way mediaInputStream was created (probably not support video or something)\r\n\r\n```objective-c\r\nself.mediaInputStream = [ATLMediaInputStream mediaInputStreamWithAssetURL:asset.defaultRepresentation.url];\r\n```\r\n\r\nIf I create the message this way, it's sent successfully without crashing\r\n\r\n```objective-c\r\n        ALAssetRepresentation *rep = [asset defaultRepresentation];\r\n        Byte *buffer = (Byte*)malloc(rep.size);\r\n        NSUInteger buffered = [rep getBytes:buffer fromOffset:0.0 length:rep.size error:&error];\r\n        NSData *theData = [NSData dataWithBytesNoCopy:buffer length:buffered freeWhenDone:YES];\r\n        LYRMessagePart *messagePart = [LYRMessagePart messagePartWithMIMEType:@\"video/quicktime\" stream:[NSInputStream inputStreamWithData:theData]];\r\n        NSError *theError;\r\n        LYRMessage *message = [self.layerClient newMessageWithParts:@[messagePart] options:nil error:&theError];\r\n        BOOL success = [self.conversation sendMessage:message error:&theError];\r\n```\r\n\r\nCould somebody point me to the direction on how to send video message using ATLMediaInputStream?\r\nThanks !"}}