mediainfo icon indicating copy to clipboard operation
mediainfo copied to clipboard

Remote url support

Open Maxou44 opened this issue 5 years ago • 0 comments

Hello,

Thanks for your project, it looks nice and works well 😉

This PR adds the URL support, now you can put any http(s) url to get information about any remote file 🥰

import mediainfo from '../src';

mediainfo('http://dl5.webmfiles.org/big-buck-bunny_trailer.webm').then(
  (response) => {
    console.log(JSON.stringify(
      response, null, 2,
    ));
  },
).catch((err) => {
  console.error(err);
});

The mediainfo function now takes an headers object as second paramters, in case of you need to send auth headers 😎

I made changes about the package export, can you check if I broke something? I didn't updated the yarn.lock file, can you update it?

Have a great day, I hope you'll merge and release it asap 😏

Maxou44 avatar Jan 10 '20 20:01 Maxou44