Copy link to clipboard
Copied
Can the value of the source be a variable, so I can change the video sources via a function?
Video component Instance Name is Video_Display
Something like:
video_01 = "some.url";
this.Video_Display.source = video_01;
Has anyone made that sort of thing work? I can't find any information on that.
Thanks!
Copy link to clipboard
Copied
Hi.
Sure.
It could be something like:
var source0 = "your_video.mp4";
window.setTimeout(function() // a delay is needed to access components instances
{
document.querySelector("#video0").src=source0; // "video0" is the video component instance name
}, 0);
I hope this helps.
Regards,
JC