Looking to use Google Drive, storing files and having them easily streamable from my website.
I was previously using the direct google drive download link in an HTML5 audio tag. like so
<audio controls="controls">
<source src="https://docs.google.com/uc?export=download&id=1nQklEicsMeGBnuk0vv6zkHtXtyGy10S-">
</audio>
I quickly realized that every time this loads on my page, It marks as a download and I quickly run into Google Drive Download limits.
I was looking into using iframes of the preview link as an alternative, but I find its player to be ugly, hard to work with, and glitchy.
Are there are any decent alternatives with can stream Google Drive stored audio without affecting Download Counts?
Are there are any decent alternatives with can stream Google Drive stored audio without affecting Download Counts?
Unfortunately, if the Google player is not suitable, then there are no alternatives.
The only method Google provides for using their platform to stream music from Drive is using the preview link method which you already mentioned - embedding the share link in an iframe
and changing the /view
to /preview
in the share URL:
<iframe src="https://drive.google.com/file/d/<FILE-ID-GOES-HERE>/preview"></iframe>
By using the method provided by Google, you're using their preview player which is what gets embedded and shows up in your HTML
page. Aside from being restriced to using this player, the issue comes down to the fact that streaming and downloading are functionally the same thing. Streaming simply means the data is provided in a constant flow for playback rather than set out so the whole file needs to be downloaded before it can be read.
Either way, however, ultimately, the file has to be downloaded to the system that is requesting the media for playback. There is no way around this. If the Google preview player isn't suitable, then you have to stream the file to another system for playback which will use your quota.