You could try the CustromString widget. i can’t find it in the Marketplace (weird), but it works in Mx8.
In this widget you point to a microflow where you can build your iframe string and you can configure it to treat the returned string as html, so you get your string as html (in this case an embedded video) on your page.
I've found the answer.
I can just use the ‘formatstring’ widget and use this HTMLcode:
<iframe width="400" height="240" src="${URL}" frameborder="0" allowfullscreen ng-show="showvideo"></iframe>
And define the parameter URL with the YouTube link.
Maybe not applicable for your Mendix version you are running but if upgrading to Mx8 is possible for your project, you can then you can use the Video player widget.
I'll think you can use a Nanoflow which generates this html code. The code (LPLuCGQPd0Y) of the video you must store in a attribut in a table which can be updated bij a microflow.
Sorry, no time to doublecheck but does this videoplayer help:
See https://mydemoversion8-sandbox.mxapps.io/p/webcam for an example and also examples of other players. You can download the code on https://github.com/TimvanSteenbergen/MyDemoVersion8
O, the ancient greek version Mx7 (EOL in a couple of months), see https://mydemoversion7-sandbox.mxapps.io/p/webcams/. Less options though.
I'm still looking to make it work with the Javascript instead of a Video player to be honest.
Thank you for answering this.