Giter VIP home page Giter VIP logo

Comments (6)

pentarex avatar pentarex commented on September 10, 2024

OK, I will see how exactly to do it, and try it.
I saw that you forked it, if you want to do it, please make pull request

from react-native-gallery-manager.

rangav avatar rangav commented on September 10, 2024

I am still doing research on this, if i found a solution then happy to implement and submit a PR. will update you..

from react-native-gallery-manager.

pentarex avatar pentarex commented on September 10, 2024

Ive started implementing some of this functionality.
the method will be called convertVideo
the params will be

id: Local id of the video asset,
compressType: check preset names
convertTo: some of those only, I think AVFileTypeMPEG4, AVFileTypeAppleM4V, AVFileTypeQuickTimeMovie
tempName: the temporary name of the asset.

where compressType, convertTo, tempName are going be optional.
So the client can choose to convert or to compress or both

It will return probably the same stuff as now (if makes sense)

NSArray * _Nonnull localIds = [NSArray arrayWithObjects: localIdentifier];
  
  PHFetchOptions *fetchOptions = [[PHFetchOptions alloc] init];
  
  PHAssetCollection * _Nullable video = [PHAssetCollection fetchAssetCollectionsWithLocalIdentifiers:localIds options:fetchOptions].firstObject;
  
  [AVAssetExportSession exportSessionWithAsset:video presetName:AVAssetExportPresetPassthrough];

tell me what you think

from react-native-gallery-manager.

rangav avatar rangav commented on September 10, 2024

Looks good buddy to me, Please go ahead and publish it, I will test it and let you know any suggestions.

from react-native-gallery-manager.

pentarex avatar pentarex commented on September 10, 2024

Probably end of the week.

from react-native-gallery-manager.

pentarex avatar pentarex commented on September 10, 2024

implemented in 1.0.5

from react-native-gallery-manager.

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.