|Topic was automatically imported from the old Question2Answer platform.
I have a video player which works fine. However, I need it to play a different video.
To troubleshoot my code I print out and do the following:
1.) I print the stream.resource path and it prints the original stream file path.
2.) I print out the stream.get_file() which prints the original stream file path.
3.) I use “stream.set_file(new_video_path)” to set the stream to the new video I want to play.
4.) I print the stream.resource path again and it prints the original stream file path.
5.) I print stream.get_file() and it prints the new video I want to play.
6.) I play the video and it plays the original video not the new one.
The resource path remains the original however I did try setting the resource path directly also and when I try that it goes to an empty string, but the original video still plays.
How can I swap out the video so I can play something different? Using another video player is not the best option as I may have many videos and it will become a huge pain. Also, videos may be added later and it needs to be dynamic.