How can I retrieve Hubspot video metadata?

Folks,

I’m working on a module for a video page, {% video_player “embed_player” %} works nice, but how do I get any metadata for a video, eg. most notably thumbnail url, video title, source file within a module if i wanted to be a little more flexible about the videos?

Thanks!

Hey, @fiberpunk :waving_hand: Let’s see if we can get the conversation going for you with our community — @Brownstephen101 @RomanGruit @Indra, do you have any experience or insight you can share with @fiberpunk?

Thank you! — Jaycee

Hi @fiberpunk,

Did you check the Tags for Video Player?

There you can find all options.

You can also use the debug filters like |pprint or |tojson to view all options inside a field.

Sadly I can’t find the video url from it when looking at the video_player field.

@Indra That is exactly my issue … the last thing I have tried is to get metadata by using the file_by_id() function using the player_id that I do receive. But: That does not deliver anything at all … bummer.

Hi @fiberpunk,

What is the goal you want to achieve? Perhaps there is another way to get to there?

Instead of using the HubSpot video, you can maybe use the ‘file’ type to display a video as an .mp4 file.

Hi @Indra ,

Ultimately I want to be load/start/stop HS videos that are on the page via JavaScript. Surely I could completely build my own player, but I want the tracking etc. that the HS player is doing in the background to do its job, and not just have to rebuild all that myself too … :disappointed_face:

Hi @fiberpunk,

What you can try is looking into the documentation / hooks of Video JS. I see HubSpot is using that library for loading videos.

+1 to this. I would also like to understand how to access the metadata. My use-case is simple: I want to access the URL for the associated thumbnail image.