HTML iframe with different videos

On my page I already have a HTML iframe.
I would like this HTML iframe to show different videos.
What I would like to be able to do is send the HTML iframe a message containing the link to the video and then the iframe use this message to show that particular video.

I understand that something like this would be placed in my page code…

export function button1_click() {

Not sure about the code to put in the iframe.
The html code for the iframe can have a standard form (same height/width etc) but where the link to video comes from the message and is not just set.

Please help?
@yisrael-wix or any other experts help would be much appreciated! Thanks

You can use the src property to set the iframe’s URL, check out the API here .