I wanna create a video course platform layout. Like
Video player on the left and list of videos on the right to choose.
Based on what video the user chooses on the right, the video player on the left should change to that video.
How can I achieve this?
Is there any tutorial or such to look at?
Something like this
How I achieve a similar layout?
I can use RG for the videos list but how can I display the video based on what video user chooses in the RG. How do I achieve that?
Can anybody please help me with this?
In a nutshell one way to do this is to use a set state. Here is a video on set states if you don’t know how to use them yet. Set States FREE Video Tutorial 🎉
So you can set a state on the page itself to say “Current Video” and then when the user clicks on the list of videos on the right you can pass that videos YouTube code to the “Current Video” set state.
Then on the main video on the left just reference the “Current Video” state on the page. It will change depending on whatever the set state video is.
Does that make sense? I hope that is helpful.
Want to learn more?
So, if I had 20 videos, Will I have to create 20 states?
Nope, just one state. That one state changes depending on which video you click. Your main video only needs to look at the one state to know which one to show.
Thanks alot for the help. Will surely try it out
Let me know if you need further help with it and I will see what I can do.
This topic was automatically closed after 70 days. New replies are no longer allowed.