View Full Version : Changing videos globally
kmartin7
03-25-2004, 03:29 PM
I need a method of allowing the end user to select something (either via dialog or other method), so he can choose to watch lower resolution videos on all pages.
For example, the user click on a link that launches a dialog that asks if he wants to watch lower resolution videos because his particular system may not handle high quality videos from CD.
Is there a way to capture this and use it on every video page?
Thanks,
Kurt
TJ_Tigger
03-25-2004, 05:38 PM
You could either ask via a dialog or check on the users processor speed and make a decision from there. Once they make their choice you could then store this information in an .ini file or a registry entry and then everytime you play a video you could use an if statement to play the appropriate size of video
if regkey == "low" then
--play low
elseif regkey == "high" then
--play high
end
kmartin7
03-25-2004, 06:04 PM
Thanks, TJ. I will give it a try.
kmartin7
03-26-2004, 03:45 PM
This method seems so system intensive, having to check the existence of a file each time a video is played. Is there anyway to set a global variable in the application? That way I can check the variable instead of searching for a file or reg entry.
Desmond
03-26-2004, 04:09 PM
Hello KMartin7,
Any variable you set retains its value until overwritten, or until the program is shut down. (ie there is nothing special you have to do to create a global variable. They are ALL global variables! :))
So you could pop up a yes/no dialog, and store the result in a variable.
Then play your videos using an if statement, controled by this variable.
Assuming you don't overwrite that variable, it will retain it's contents until your application is closed.
Let me know if that's what you needed.
Desmond.
kmartin7
03-26-2004, 04:16 PM
Actually, the registry entry works so quickly, it takes no time at all to load the proper video.
Thanks Tigger.
Thanks Desmond.
Kurt
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.