Reputation: 11
So I have a HTML5 video player that plays a video from Google Drive. The video is more than 100MB in size, so I created a Google Drive API key and included it in the code for the video. However, I can only play about five videos until my quota runs out. Am I doing something wrong? Is there a more efficient way to play the video, without constantly running out of my quota? This is the error I'm getting:
{ "error": { "errors": [ { "domain": "global", "reason": "downloadQuotaExceeded", "message": "The download quota for this file has been exceeded." } ], "code": 403, "message": "The download quota for this file has been exceeded." } }
Here's my code:
<!doctype html>
<script type="text/javascript">
function init() {
window.parent.postMessage("ready", "*");
window.onmessage = (event) => {
var video = document.getElementById('video');
var source = document.getElementById('source');
source.src = "https://www.googleapis.com/drive/v3/files/" + event.data.id + "?key=<APIKEY>&alt=media"
video.appendChild(source)
video.addEventListener('loadeddata', function() {
video.currentTime = event.data.playHead;
});
}
}
</script>
<video id="video" width="100%" height: auto controls style="display:block; margin:0 auto;">
<source id='source' src="" type="video/mp4" />
</video>
Upvotes: 1
Views: 4756
Reputation: 116918
How to increase the google drive quota:
Left hand side select Library search for google drive api
Click manage (blue button)
Left hand menu select quotas
Click the pencil icon to increase the quota.
Upvotes: 2