Google Drive as a video hosting/streaming platform

2019-04-30 03:02发布

问题:

I'm developing an iOS app that generate video files and have a social gallery for users to display their clips. After a lot of research I found that Google Drive would be perfect to fit my needs so I did some testing and sucessfully made the app upload the file to GDrive and everything.

Now I need to stream the uploaded file in a MPMoviePlayerViewController, for that I would need some kind of direct link, I'm right? After my initial tests I used the variable WebContentLink as a source URL and it worked flawlessly, I was really happy with the result, however now it doesn't work anymore, I don't know what happened and I think the method that I used is not realiable? I tried all the other possible links and none of them seems to work.

Can someone give a guidance about if this is really supported by Google Drive and how it's the best way to archive that in a reliable way?

Thank you very much !

回答1:

I too encounter the same error when I try to download 28 times (testing) the same 24mb file.

However I realise if I am to download using the content owner ID, it does allow downloading after the 28th time

https://docs.google.com/a/onwardsct.com/uc?id=0ByvXJAlpPqQPYWNqY0V3MGs0Ujg&export=download

Sorry, you can't view or download this file at this time.

Too many users have viewed or downloaded this file recently. Please try accessing the file again later. If the file you are trying to access is particularly large or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you still can't access a file after 24 hours, contact your domain administrator.



回答2:

The experience for streaming files natively is not ideal right now, sorry. It is something Google are working on.

You are doing this correctly though. The webContentLink should use the user's quota, and that should be enough for most cases. If you can give some specific numbers, we can look at it.

The embed link is the best way to show it on a mobile device, but as you say won't work everywhere.



回答3:

yes, google drive can be used for hosting and stream videos as you like. It can also be used as demo server for web projects. Here is how to host a website on Google drive.