Bunny CDN Stream on a dynamic page

Has anyone used Bunny CDN streaming on a dynamic page before?

Wix Editor

I am trying to dynamically embed a video stream from Bunny CDN on a dynamic page linked to a dataset/collection.
The collection has a “direct play” link and the iframe embed string.

Each video has a thumbnail link that I can dynamically link to an image, which works.

What have you already tried:
I have tried the videoplayer and adding the direct play link dynamically here, but I believe the security settings only allow embedding or the video player does some connection work in the back for the different platforms, which it wont do correctly for bunny streaming.
If this worked correctly or the WIX video connected to bunny CDN, it would be the simplest answer.

When I statically embed the iframe, it runs perfectly, but if I try to update the src from the dataset I end up with a 400 error. Static is no-go since I would need to build a million pages and wont be able to maintain them.

If I use the direct play link in the HTMLcomponent, it does update and run. There are two problems:

  1. I would prefer not to use direct play if I am embedding anyway.
  2. It opens like a page, which means there is a lot of negative space around the video player, which is a disaster when going to mobile.

I note that there is no great way to store iframe code in the CRM collections. I am using text now, but it complains when I add full strings.

I could dynamically build the iframe code at runtime and then apply the source if it makes a difference. Might try that as well.

Additional information:
BunnyCDN uses MediaCage DRM. I am using the basic version.

I have not enabled token authentication.

Just after writing this I realised the problem may sit in my understanding of how iframes and the HTMLcomponent works.

Rephrasing my question I found the answer to use a dynamic embed here: