Display video properly in IMessage
Asked Answered
U

1

6

Currently, I am developing an App in which I have to send photo/video via IMessage. Photo

sending code is proper working but when I am sending video via IMessage I am only getting

a icon make in composer no video is display like below:

enter image description here

I am using this code to display video in IMessage for sending:

if (ver_float < 6.0)
        {
            UIPasteboard *pasteboard;
            pasteboard = [UIPasteboard generalPasteboard];
            NSString *filePath =pathToVideo;
            NSData *datavideo = [NSData dataWithContentsOfFile:filePath ];
            [pasteboard setData:datavideo forPasteboardType:[UIPasteboardTypeListImage objectAtIndex:0]];
        }
        else
        {
            UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
            NSString *filePath =pathToVideo;
            NSData *videoData = [NSData dataWithContentsOfFile:filePath];
            [pasteboard setData:videoData forPasteboardType:[UIPasteboardTypeListImage objectAtIndex:0]];

        }
    NSURL *urlstr = [NSURL URLWithString:@"sms:"];
    [[UIApplication sharedApplication] openURL:urlstr];

How can I solve this? Thanx in advance.

Unpen answered 24/12, 2012 at 9:50 Comment(1)
I don't think the UIPasteboard API allows for storing videos and audio, only images. However, I could be wrong.Fancied
E
0

Sadly, (as simonbs suggested) the UIPasteboard SDK will not be able to help you with this, it does not support video and audio at this moment. Sadly, I might add.

Possible duplicate : copy video to uipasteboard

Engrave answered 6/1, 2013 at 18:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.