Get a video component to play a video from a private google bucket

I have a table that lists the Google Bucket contents with all of the usual tags mediaLink, selfLink, body etc. but when I set the video value to be {{ table.selectedRow.data.body }} etc. or any of the other tags, it does not play the video.

The strange thing is I have images in the exact same bucket and they display fine in the image component in retool using {{ table.selectedRow.data.body }} but the same doesn't work with the mp4s.

I was told that I need to generate a signed URL for videos but that would mean I have to generate them for every single mp4 externally and there are hundreds of videos. Is there a way around this to just get the video player to render the .body content the same way the image component does?

I don't know how anyone plays videos from private resources otherwise and seems fairly universally done for any group working with private videos (i.e. beyond just the basic playing of Youtube/Vimeo URLs as per the documentation).

I worked it out and I'm not sure if this was because I entirely missed it or if it was a feature already when I wrote my question...

"Generate a signed URL" was is an option as an action type appears in the drop down list for a new query of a GCS bucket. This is wonderful news because I can now trigger this when a new row is clicked and the video can be played - when I set my video component to be {{ getSignedURL.data.signedURL }} the video appears and plays.

Apologies if I jumped the gun.

I have a similar problem when using Digitalocean's spaces -- is there another way around or it needs to be a public URL to make the video component work?

Hey @bg1900! The url needs to either be public or you need a way to grab an authenticated URL as @griffxbio did above with the signed url.

thanks for the clarification Joe.

Do you (or anyone else on this forum :wink: ) happen to know if this 'signed url' method (or similar) can be done with DigitalOcean?

@bg1900 Yes, it looks like they do support pre-signed URLs.

1 Like

ah ok cool!

I'll have to look into how to make this work with s3cmd and Retool.