Ionic-native plugin to manipulate media files

Hello,

Anybody know if Ionic-native can merge media files locally (mp4 + mp3 -> mp4).
Seek a method do this, because I dont want to send the media files to remote server, do merging, then send back to client. This adds much unnecessary traffic.

Br,
Xi Xiao

Hello

I don’t think that is something feasible. Once ionic is based on (javascript) and it doesn’t have the power to do this. You will need server side tools to do this. For example ffmpeg and LAME in case of MP3. Why don’t have a server with your files over there and just send it back to client asynchronous so you will reduce the payload.

Hi Nick,

I know that native API in both Android and iOS can manage this, so I come here to consult.
The reason is that the user needs to preview the final mp4 (merged result) and decide whether he wants to publish or not. In case not, the mp4 is discarded. In this scenario with the design of merging on the server side, unnecessary network traffic and server side resource occurs.

Thus I wonder if there is a way to avoid such.

Br,
Xi

You would probably need a Cordova plugin for this as this most probably needs native functionality to work. I don’t know one that does this, but feel free to google a bit. Also if you find native libraries that do this, it is not that hard to encapsulate them in a Cordova plugin yourself.

Thank you Sujan12, I will take a look how to wrap and create a cordova plugin.