Reputation: 6758
When a video file is uploaded to Google Drive, it gets transcoded to a bunch of different formats and resolutions, so that it can be previewed efficiently depending on the platform, screen size, network bandwidth, etc. Pretty much like putting a video on YouTube.
What I'm looking for is a way to get a direct URL to any of the different transcodings, in the same way that I can get a URL to download the original file. It's ok if the URL is temporary. To get the original file, I'd do a File: get call through the API, then download the downloadLink URL from that response. So I was hoping there would be a parameter to the API call that would specify, instead of the original file, the 360p webm transcoding (for example). But I don't see any such parameter, nor an alternate API call to do the same thing.
In my use case, I'd be calling the API from JavaScript on the client side, and pasting the resulting URL into an HTML element. I would need the video to be served with CORS headers (I want to use the video element as a WebGL texture). Though it might also be useful to have a solution that didn't include CORS headers.
Any way to do this? Maybe an unofficial workaround?
Upvotes: 1
Views: 1184
Reputation: 12673
The Google Drive API doesn't support this, nor is this a core use case for the product.
Upvotes: 2