Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

Help with Windows media player events

$
0
0
Hi everyone,

I am currently making a program that will serve as a replacement for powerpoint. My program will need to play, in a specific order, 144 videos. The maximum video length is going to be 8 seconds. The reason I am abandoning powerpoint is because it starts to get buggy and occasionally crashes when you try to have a slideshow with that many videos.

This is my first time using the video player in VB so I am still figuring out how it works.

Basically what I need it to do is to automatically play a video, once that video ends it should automatically move on to the next video on the list. For every two videos there is one video that needs to repeat until a user manually hits a next button.

So the general format is:

repeating video
video 1
video 2
repeating video
etc.

I have figured out how to make a video autoplay and play full screen etc. I have also figured out that I can use the following code, with a button, to play the next video when the first video finishes:
Code:

If AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsStopped Then
            AxWindowsMediaPlayer1.URL = "videos\video1.wmv"
            AxWindowsMediaPlayer1.Ctlcontrols.play()

        End If

I plan on ultimately replacing the URL of the videos with an array for of all the videos. My question is then, where do I put the above code so that it play automatically so that I wouldn't have to hit a button or link it to a timer?
I tried to put it under the event handler for the media player its self but that didn't work. Any ideas?

Also, I was wondering if anyone knew how to make a video loop. I figured out how to set the number of times a video plays but not loop indefinitely until a next button is manually hit. I guess I can always set the play count to something absurd and then hit next when I need to.

Thanks for your help!

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>