There are two methods I’m aware of for obtaining HTML embed code for a video:
- From the Dashboard under
Stream> [video] >
- Using the API’s /embed end-point.
Only option #1 (Dashboard) is able to produce playable content for me.
The API, option #2, is working and providing HTML code, but the code does not result in playable content. I’d like to confirm firstly, whether the API’s embed code is producing playable content for anyone else? Ideally I’d prefer this option, because if the embed code is updated by Cloudflare, presumably this will naturally take advantage of that.
My current workaround has been to manually construct HTML embed code, using the Dashboard’s example (option #1) as a template.
For the record, I’ve been testing with a video that has no restrictions (eg: origins, signed URL).
The embed code provided differs as you can see below.
Option 1 - Dashboard - WORKING
<div style="position: relative; height: 0px; width: 100%; padding-top: 56.25%;"> <iframe src="https://iframe.videodelivery.net/[some video id]?poster=https://videodelivery.net/[some video id]/thumbnails/thumbnail.jpg?time=&height=600" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true"> </iframe> </div>
Option 2 - API - NOT WORKING