How to populate component dialog field with video asset's YouTube URL using picker
We have a video component that allows the author to select a video to embed in the component. How can I allow the user to map to the video, but then insert the value for the video URL property into a field in our HTML file?
For example, the path to a video would look something like this:
/content/retail/en/videos/chicken-fettuccini-recipe/

We need to extract the YouTube video ID, which is 'aRWzFTqQZpk' in the example below, and insert it on our page.

Final markup:
<div class="yt-player" data-src="aRWzFTqQZpk" data-div="some-id" data-height="360" data-id="some-id" data-width="640">
Any suggests on how to approach this?