How would we go about getting a video from google cloud storage and streaming that video to a mobile device?
I dont see anything related to videos in the Java API
like there is for getting images with ImagesServiceFactory
The videos are only going to be a maximum of 10-15 seconds long if that makes any difference.
Any advice on how to proceed here would be great
There is no difference between streaming a video and downloading any other file from the Cloud Storage. Thus, no special video API.
If the files are not public, you need a servlet that will read the content of the video from Cloud Storage and stream it to the client. Note that you cannot run it on App Engine or managed VM as they do not support file streaming and the request size is limited to 32MB.
Your best option is to run this on a Compute Engine instance:
Alternatively, you may use a signed URL for your video files. This saves you from developing/deploying a separate Compute Engine instance just for the streaming purposes - signed URLs can be returned by your existing backend.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With