Dynamic metadata through player created in JS

Hi,

How can we add dynamic metadata parameter to an iframe created throught JS ?
We have to create the player throught JS and i can not find any solution to this problem.

Thanks

This is a great suggestion - and we will add it to the Player SDK

You might try building the iframe from JS (and then you can insert the dynamic metadata)

That’s what i did. Thanks for your answer.

To follow up -

It is now possible to use the Player SDK to add dynamic metadata:

Today:

new PlayerSdk("#target", { 
                    id: "video1",
                    "metadata[key]": "value"
                 });

We have a pull request to add this:

new PlayerSdk("#target", { 
                id: "video1",
                metadata: {
                    key: "value"
                }
             });

Once that pull is merged - both approaches will work.

Doug

1 Like