Hi Zac,
I’m creating a topic here as you asked in email support.
THE PROBLEM:
I’ve developed a custom block that embed Media Library, Youtube, Vimeo, or Other source video as selected using a tag <smartvideo>. The tag works like <smartvideo src={smartvideoEmbedLink} width='1240' height='742' class='swarm-fluid' autoplay muted loop controls playsinline></smartvideo>
The options are created in Control Panel right side. But one problem I faced is that the block preview doesn’t auto fresh on options changes. It actually save the data because the changes shows on manually reload the page.
PROBLEM SCREEN RECORD:
https://recordit.co/Y5qADa8vHn
POTENTIAL SOLUTION:
I went through https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/video/edit.js#L301 I found that using createRef
could solve the issue, but it works for video
tag only. Doesn’t work for iframe
or our custom tag smartvideo
Any help is highly appreciated.
Thanks in advanced.