How To Use Google Drive API v3 To Stream and Download Videos 1

How To Use Google Drive API v3 To Stream and Download Videos

Well all the developers have heard about the never API version of google which is v3. According to google there are not many changes in v3. Its the same as v2 but the speed and performance have drastically improved in v3.

Coming to the topic which is How To Use G-Drive API v3 to Stream and download videos. To do that follow this post till the end and you will get your answer.

Generate Your Google Drive API

I don’t think I have to explain it. You can just check out the official article of google on How to Generate Google Drive API.

Download Videos Using Google Drive API

To make a link which will directly download the video of Google Drive you have to use this format –

https://www.googleapis.com/drive/v3/files/Google Drive Link ID?alt=media&key=YOUR API KEY

How to Obtain Google Drive Link ID?

Most of you will think what is google drive link ID. Every Google Drive file have its own unique ID which you can find in URL of google drive links.

How To Use Google Drive API v3 To Stream and Download Videos 2

How to Stream Google Drive Videos Using Its API?

I’ll be using HTML 5 Video player to stream Google Drive Videos. You can also choose Video.js its upto you. Its simple just place your codes and under the source area paste the download link we created using v3 API.

Here are the codes

<!DOCTYPE html> 
<html> 
<body> 

<video width="400" controls>
  <source src="https://www.googleapis.com/drive/v3/files/G-Drive-ID?alt=media&key=API-KEY" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

</body> 
</html>

Conclusion

Google have made things very simple for developers like us. In this post I have shown you How To Use Google Drive API v3 To Stream and Download Videos. If you still have some doubts or you are facing some issue please let us know we will be happy to help you.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *