Giter VIP home page Giter VIP logo

gdrive-video-backend's Introduction

Google-drive-video-streaming-nodejs

This is a small script in nodejs that allow you to watch a video stored into your Google drive directly into your video player.

Client Secret file configuration

{
  "web": {
    "project_id": "videoportal-192905",
    "client_id": "824071160160-b7clga6gs94g6moca0rdu3o9fg5qon5n.apps.googleusercontent.com",
    "client_secret": "Mk8V2rTqX5_a1Tki7HB79Hdu",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://accounts.google.com/o/oauth2/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "redirect_uris": ["http://127.0.0.1:8998/code"]
  }
}

Install

You need only to install all the dependencies typing this command:

npm install

Usage

Just type this command to startup the script:

node ./app.js

Now that the server is started you can start watching your video or download it.

Streaming

Paste this link into your player to start watching the video in streaming

http://127.0.0.1:8998/<google-drive-video-id>

File Info

Paste this link into your player to start watching the video in streaming

http://127.0.0.1:8998/<google-drive-video-id>/info

File Listing

Paste this link into your player to start watching the video in streaming

http://127.0.0.1:8998/

Download

To download it, type this url into a new broser tab

http://127.0.0.1:8998/<google-drive-video-id>/download

if you want you can specify the parameter p, that indicate in percentage what portion of video will be skipped. For example to start downloading the video from half you should use this link

http://127.0.0.1:8998/<google-drive-video-id>/download?p=50

You can even use the parameter c, that indicate from what chunk the download must be started. To stop the downloading process use this url:

http://127.0.0.1:8998/<google-drive-video-id>/download_stop

gdrive-video-backend's People

Contributors

dgbkn avatar osikhena avatar

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.