Is Vimeo Player return video size in bytes or mb?

367 views Asked by At

I'm trying to get vimeo video size in react native but i didn't find solution yet. So is there any way to find vimeo video size in React Native?

1

There are 1 answers

1
Bogdan Lonchuk On

Check the JSON response which you use for video fetching:

GET https://api.vimeo.com/videos/{video_id}

This information is located here under "files" in the response.

{
    //More data here
    "files": [
            {
                "quality": "hd",
                "type": "video/mp4",
                "width": 1920,
                "height": 1080,
                "link": "",
                "created_time": "",
                "fps": 50,
                "size": 0,
                "md5": "",
                "link_secure": ""
            },
            {
                "quality": "hd",
                "type": "video/mp4",
                "width": 1920,
                "height": 1080,
                "link": ",
                "created_time": "",
                "fps": 25,
                "size": 0,
                "md5": "",
                ""
            },
            {
                "quality": "sd",
                "type": "video/mp4",
                "width": 960,
                "height": 540,
                "link": "",
                "created_time": "",
                "fps": 25,
                "size": 0,
                "md5": "",
                "link_secure": ""
            },
            {
                "quality": "sd",
                "type": "video/mp4",
                "width": 640,
                "height": 360,
                "link": "",
                "created_time": "",
                "fps": 25,
                "size": 0,
                "md5": "",
                "link_secure": ""
            },
            {
                "quality": "hd",
                "type": "video/mp4",
                "width": 1280,
                "height": 720,
                "link": "",
                "created_time": "",
                "fps": 50,
                "size": 0,
                "md5": "",
                "link_secure": ""
            },
            {
                "quality": "hls",
                "type": "video/mp4",
                "link": "",
                "created_time": "",
                "fps": 50,
                "size": 0,
                "md5": "",
                "link_secure": ""
            }
        ]
   //More data here
  }