32
Views
2
Comments
Solved
update the video URL dynamically when a list item is clicked

Any idea on how to dynamically change the video url once a list item is clicked?

I have already imported 4 videos in my resources, each have their own runtime path. I have made an entity with the runtime path as an attribute.

Once I click on my listitem, I should have changed the URL of the video however the video doesnt update. 

Any idea on how to make this happen?

2025-12-17 21-10-06
Shlok Agrawal
Solution

Hey @Kadir Aksu 

1) Eg you have 2 videos in your resource

2) On the Resource properties tab, from the Deploy Action drop-down, select Deploy to Target Directory. 

3) You can copy the runtime path from the Resource Runtime Path property tab  

4) On the Video Properties tab, you can also define (optional) properties, such as the height and width of the video and the audio setting 

5) Now on the screen make 2 local variables each of them have datatype as text and default value as the runtimepath of these videos. lets just name as URL1 and URL2.

6) Make another local variable "Required URL" data type as Text.

7) To the video  widget give URL path as the local variable "Required URL".

8) Now assign the "general url" the value of "URL 1" via a client action.

9) If some another option is clicked assign "General URL" as "URL 2".   


Now you have to just make sure the URL path to be saved in local variables URL 1 and URL 2

Thanks 
Shlok Agrawal

2019-08-28 11-43-22
Bruno Marques

Hi,

Instead of setting the URL dinamically, you should have a list of video widgets and it will show the video that you clicked.

Please check the attached oml. 

Note that I had to remove the videos in resources in order to be possible to upload the oml file. If you keep the implemented logic and the video URL in the entity matches the URL in the resources, it should work.

Regards

SampleVideo.oml
2025-12-17 21-10-06
Shlok Agrawal
Solution

Hey @Kadir Aksu 

1) Eg you have 2 videos in your resource

2) On the Resource properties tab, from the Deploy Action drop-down, select Deploy to Target Directory. 

3) You can copy the runtime path from the Resource Runtime Path property tab  

4) On the Video Properties tab, you can also define (optional) properties, such as the height and width of the video and the audio setting 

5) Now on the screen make 2 local variables each of them have datatype as text and default value as the runtimepath of these videos. lets just name as URL1 and URL2.

6) Make another local variable "Required URL" data type as Text.

7) To the video  widget give URL path as the local variable "Required URL".

8) Now assign the "general url" the value of "URL 1" via a client action.

9) If some another option is clicked assign "General URL" as "URL 2".   


Now you have to just make sure the URL path to be saved in local variables URL 1 and URL 2

Thanks 
Shlok Agrawal

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.