[C#] Media Player - Need Help!

No Mercy

Master Sergeant
|K3| Member
|K3| Media Team
I'm trying to create a media player that can load MULTIPLE CLIPS at a time. Just load. Not play.

When you load the program, I was hoping that the user can click "load" and select different files for each of the buttons.

Once the clips have all been loaded, the user can go through and click a "play" button that corresponds with the Load Button.

I also hoped that beside each "play" button, there be a Loop Checkbox (if ticked, it loops the video)

The Program so far: http://puu.sh/6ipGy.png

Current Source:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MediaPlayer{publicpartialclassForm1:Form{

publicForm1(){InitializeComponent();}

privatevoidForm1_Load(object sender,EventArgs e){

}

MediaPly _mp =null;privatevoid button1_Click(object sender,EventArgs e){if(openFileDialog1.ShowDialog(this)==DialogResult.OK){
_mp =newMediaPly();}}

privatevoid button2_Click(object sender,EventArgs e){
_mp.LoadFile(openFileDialog1.FileName,this.panel1);}

privatevoid button3_Click(object sender,EventArgs e){if(openFileDialog1.ShowDialog(this)==DialogResult.OK){
_mp =newMediaPly();}}privatevoid button4_Click(object sender,EventArgs e){
_mp.LoadFile(openFileDialog1.FileName,this.panel1);}

privatevoid button5_Click(object sender,EventArgs e){if(openFileDialog1.ShowDialog(this)==DialogResult.OK){
_mp =newMediaPly();}}

privatevoid button6_Click(object sender,EventArgs e){
_mp.LoadFile(openFileDialog1.FileName,this.panel1);}

}}

Current Project Files:
https:\/www.dropbox.com/s/zul78tjc1hw3wax/Media Player.rar

If anyone could help, that would be amazing.
 
Last edited:

Kreubs

|K3|Minecraft Admin
|K3| Executive
What do you mean by "load"? The best thing I can think of is just storing the path of each file using the load function and having that file played when the play button is hit.
 
Last edited:

No Mercy

Master Sergeant
|K3| Member
|K3| Media Team
Please put it in
Code:
so it's easier to read. thanks!
Done.
What do you mean by "load"? The best thing I can thing of is just storing the path of each file using the load function and having that file played when the play button is hit.
Yeah, Pretty much this. But would it be seamless? Example: When you are playing one clip, you play the other clip, would there be some sort of delay?

:3 ~Mercy
 

Kreubs

|K3|Minecraft Admin
|K3| Executive
So, you are trying to make a playlist? Using a button for each file is rather inefficient. What you should do is use a multiple selection file dialog that sends the selected file names to a list box. The list box could display a title, but have the file path hidden behind the scene. This way, you only need one load button and one play button.

You mentioned repeat. Check for the state of a check box. When one file finishes and the box isn't checked, tell it to increment a counter/iterator for the list to play the next file. Otherwise, play the file again.

I don't know if it would be seamless, that depends on the media player object and how quickly it can load new files.

Check this out, it has references to the .NET media player.
http://stackoverflow.com/questions/9104173/playing-video-in-a-net-application
 

No Mercy

Master Sergeant
|K3| Member
|K3| Media Team
You got a release date on this software yet? Can't wait to try it.
Stop being a cunt.
Just because I'm not competent on learning how to fucking wire telephones doesn't make me a dumbass.
Yeah, it might have been simple for you, but its easier said than done.
 
Top Bottom