Hello,
I found this solution works for me, problem on button click i have to set dynamic url on 2 places
Please advice
<link runat="server" id="vdref" rel="preload" as="video" href="dynamic video url on button clikc">
<video id="video" runat="server" width="100%" height="240" class="wrapped-iframe" controls></video>
<script>
// Later on, after some condition has been met, set video source to the
// preloaded video URL.
video.src = 'dynamic url on button clik';
video.play().then(_ => {
// If preloaded video URL was already cached, playback started immediately.
});
</script>