Can VB play clips of randomly chosen avi files?
Can a media player written in VB be modified to do this: randomly choose an avi file from a directory or subdirectory, choose a random starting point within that file and then play a clip of a random length (within user defined parameters) then without prompting repeat this sequence?
I would like just such a media player but there doesn't appear to be one already out there so my only other option is to write one myself. I know nothing about VB and last programmed in BASIC in the 90s. Before I invest time and effort in learning VB I need to know if it can actualy do this at all.
Thank you.
Re: Can VB play clips of randomly chosen avi files?
Checklist time:
Quote:
randomly choose an avi file from a directory or subdirectory
This is always possible, just place all playable files in an array and use the Random() object to pick one path from this array.
Quote:
choose a random starting point within that file and then play a clip of a random length (within user defined parameters)
Also, the Random class, but of course the player you will be using must support seeking and reading out the length of the avi file
Quote:
then without prompting repeat this sequence?
If the player can be controlled freely, then it is possible.
Everything is possible, but the main issue is of course what "Media Player Control" or plug-in you will be using. To this I have no answer unfortunately. :o
Re: Can VB play clips of randomly chosen avi files?
I asked this question on a non specialist board and some techy type directed me here:
http://www.devasp.net/net/articles/display/304.html
It was suggested that I use this media player as a base for my program. I haven't typed it in yet or tried it but do you think this could be adapted?
Re: Can VB play clips of randomly chosen avi files?
Well, as long Windows Media Player is installed, it will work. It is a COM-component, thus if the dll of this "outside of the package" is not available, the program will crash. You can use the Windows Media Player control undoubtedly, but don't forget it uses Windows Media Player and that your program is dependant of this Control.
Re: Can VB play clips of randomly chosen avi files?