Coder Social home page Coder Social logo

Comments (4)

dji-dev avatar dji-dev commented on July 3, 2024

Hi @qw9685, the DJI Phantom 3 Advanced doesn't support playback mode(DJIPlaybackManager), you can use DJIMediaManager to download the photos and videos from the SD card instead. Hope this help, thanks!

from mobile-sdk-ios.

qw9685 avatar qw9685 commented on July 3, 2024

I use the way you say: in the method of retrieving the video, setMediaList settings are

for (DJIMedia* media in self.mediaList) {
if (media.mediaType == DJIMediaTypeMP4||media.mediaType == DJIMediaTypeMOV||media.mediaType == DJIMediaTypeM4V) { // 获取MP4文件
self.imageMedia = media;
break;
}
}

and then

  • (IBAction)onShowFullImageButtonClicked:(id)sender {
    [self.showFullImageButton setEnabled:NO];

    WeakRef(target);
    __block NSMutableData* downloadData = [[NSMutableData alloc] init];

    [self.imageMedia fetchMediaDataWithCompletion:^(NSData *data, BOOL *stop, NSError *error) {
    WeakReturn(target);
    if (error) {
    ShowResult(@"ERROR: fetchMediaDataWithCompletion:. %@", error.description);
    [self.showFullImageButton setEnabled:YES];
    }
    else {
    [downloadData appendData:data];
    if (downloadData.length == target.imageMedia.fileSizeInBytes) {
    dispatch_async(dispatch_get_main_queue(), ^{
    WeakReturn(target);
    // [target showPhotoWithData:downloadData];
    ShowResult(@"正在写入文件");
    [downloadData writeToFile:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/audio.mp4"] atomically:YES];
    [self.showFullImageButton setEnabled:YES];

            });
        }
    }
    [self.showFullImageButton setEnabled:YES];
    

    }];
    }

from mobile-sdk-ios.

qw9685 avatar qw9685 commented on July 3, 2024

Is this method right? Why is it very slow..

from mobile-sdk-ios.

dji-dev avatar dji-dev commented on July 3, 2024

Hi @qw9685, yes, it would become slow when you download video files (Especially big size) from the drone.

from mobile-sdk-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.