Media Player in C# Visual Studio By Rohit Programming Zone

Поділитися
Вставка
  • Опубліковано 31 жов 2024

КОМЕНТАРІ • 61

  • @maxin2134
    @maxin2134 3 роки тому +1

    Guys! Give like, make a comment and share! This person need our help to make him popular because he made a lot of good work! Keep going

  • @keshavkumar1468
    @keshavkumar1468 2 роки тому

    You are grate man, very nice and helpful video....😘😘😘😘❤️❤️❤️❤️❤️❤️

  • @omalley498
    @omalley498 3 роки тому +1

    You are a champion of the people! Simply the best tutorial for making a media player on UA-cam. Great frickin job man! Thank you so much!

  • @fuadal-mrerr8267
    @fuadal-mrerr8267 3 роки тому +1

    Thanks anyway your video is so helpful

  • @rasbry225
    @rasbry225 17 днів тому

    Nice tutorial, But I am wondering if can run .h264 file. Which is the file of CCTV.

  • @nerts4720
    @nerts4720 4 місяці тому +1

    you can add this
    lbl_msg.Text = "Playing: " + track_listed.SelectedItem.ToString();
    this is for showing text, which music is playing right now

  • @العروسيدودي
    @العروسيدودي 3 роки тому

    Thank you very much my teacher

  • @vickyromyata1450
    @vickyromyata1450 3 роки тому +1

    Rohit, can you make textbox and button search title video in this tutorial next , please 🙏 ... ???

  • @sakthivelp3035
    @sakthivelp3035 2 роки тому

    Hi Rohit, super video! But progress bar is a downloading icon it's normal bar how to give a bar so please tell me,and thank you with coding guidness.

  • @stevebassett8561
    @stevebassett8561 3 роки тому

    A great tutorial. Thank You !

  • @wotmastersclub5559
    @wotmastersclub5559 4 місяці тому

    Супер 👍

  • @sakthivelp3035
    @sakthivelp3035 2 роки тому

    Hi Rohit again one doubt how to embeding ( online searching)a video in media player in c# .

  • @evgeniuxp2evgeniuxp234
    @evgeniuxp2evgeniuxp234 5 місяців тому

    and how to start a media file from a certain position, for example, from 32 seconds? Did you click on any track in the list and it starts at 32 seconds?

    • @rohitprogrammer
      @rohitprogrammer  5 місяців тому

      This code uses NAudio to read an MP3 file and play it starting from the specified time in seconds. Make sure to install the NAudio package via NuGet if you haven't already.
      using NAudio.Wave;
      class Program
      {
      static void Main(string[] args)
      {
      string filePath = "your_music_file_path.mp3";
      double startTimeInSeconds = 30; // Start playing from 30 seconds
      using (var reader = new Mp3FileReader(filePath))
      {
      using (var waveOut = new WaveOutEvent())
      {
      waveOut.Init(reader);
      waveOut.PlaybackStopped += (sender, eventArgs) =>
      {
      // Handle playback stopped event if needed
      };
      reader.CurrentTime = TimeSpan.FromSeconds(startTimeInSeconds);
      waveOut.Play();
      // Keep the program running until the music finishes
      while (waveOut.PlaybackState == PlaybackState.Playing)
      {
      System.Threading.Thread.Sleep(100);
      }
      }
      }
      }
      }

    • @evgeniuxp2evgeniuxp234
      @evgeniuxp2evgeniuxp234 5 місяців тому

      @@rohitprogrammer And how can you do it for video?

  • @edsonferraz1
    @edsonferraz1 4 роки тому

    OK very good vídeo, congratulation. A question please; Is possible open a device input in the USB or HDMI ports?

    • @rohitprogrammer
      @rohitprogrammer  4 роки тому +1

      There is a Assembly called (System.IO.Ports ) through you may achieve this so..Here is a link hope it's help.
      Link-docs.microsoft.com/en-us/dotnet/api/system.io.ports.serialport?view=dotnet-plat-ext-3.1

    • @edsonferraz1
      @edsonferraz1 4 роки тому +1

      @@rohitprogrammer Ok thanks a lot

    • @rohitprogrammer
      @rohitprogrammer  4 роки тому +1

      @@edsonferraz1 if you are looking for USB Functions then you can check this Link-docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/developing-windows-applications-that-communicate-with-a-usb-device

    • @edsonferraz1
      @edsonferraz1 4 роки тому +1

      @@rohitprogrammer Thanks for help

  • @manly_garroway
    @manly_garroway 2 роки тому +1

    Hello, I was able to auto-switch songs, there is no problem when I add several songs to the list at once and the song auto-skips (I was able to encode it).
    But when it's time for the song I added later, I get an "IndexOutOfRangeException" error. How can I fix this?
    This is where I got the error player.URL = path[Track_List.SelectedIndex];

  • @davidatohidalgo3842
    @davidatohidalgo3842 3 роки тому

    I have a cuestion, how add botton for remove items of list??

  • @hohohappyday77
    @hohohappyday77 4 роки тому

    Is your source code link has correct? It show only strange advertisement...

  • @danielkyprianou6667
    @danielkyprianou6667 4 роки тому

    Hi Rohit, Great video! How would I be able to save the state of the media player, so the 5 songs I have added, when I next open it they are there? Thanks

    • @danielkyprianou6667
      @danielkyprianou6667 4 роки тому

      Also would you have ideas on how to create a playlist within the media player?

    • @rohitprogrammer
      @rohitprogrammer  4 роки тому +2

      Its very easy Dainel you can simply add, update or delete store path using sql or any other database.....may b in the future there will b a video for this....

  • @gabrielkasonde367
    @gabrielkasonde367 2 роки тому

    and when I right click on a media file how should it bring the player icon on the "open with" menu?

  • @gauravmane9287
    @gauravmane9287 3 роки тому

    very nice !!! how would i be able to delete song from the list and also from the actual location of the song ???

    • @rohitprogrammer
      @rohitprogrammer  3 роки тому +1

      There is a video name called Add Save Delete Load Media Playlist files in C# Visual Studio
      ...go through it ..hope it help... :)

    • @gauravmane9287
      @gauravmane9287 3 роки тому

      Showing error for lbl_msg.Text ="playing";

    • @rohitprogrammer
      @rohitprogrammer  3 роки тому

      ​@@gauravmane9287​Make sure you have
      named label properly & refer back to the tutorial and see where you are doing mistake ..this is how you will learn...

  • @AshishKumar-zt5pt
    @AshishKumar-zt5pt 3 роки тому +2

    Sir make the coding of progreesbar ( seekbar ) media player in c# ( means forword the video and backwword the video pls ) make

  • @incorrect_composition
    @incorrect_composition 3 роки тому

    HELP ME PLEASE!!
    'System.Array' does not contain a definition for 'Lenght' and no extension method 'Lenght' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

  • @Terminator-T2000
    @Terminator-T2000 4 роки тому +1

    hello, the volume percentage limit stays 10. Any idea what may i have done wrong? i did try a lot to find a solution.

    • @Terminator-T2000
      @Terminator-T2000 4 роки тому

      i found it. i forgot to change the max value from the .designer when you single click the trackbar.

  • @DailyFMRadio
    @DailyFMRadio Рік тому

    And how can I make the list box show the name of the file organized, for example, to see the name of the song, artist and duration

    • @rohitprogrammer
      @rohitprogrammer  Рік тому

      U can check this one
      ua-cam.com/video/tnOB6Bn5F6A/v-deo.html

    • @DailyFMRadio
      @DailyFMRadio Рік тому

      @@rohitprogrammer i want to make the same but I’m trying make the information of name, artist, duration organized in the listbox appear

  • @lykamejorada7685
    @lykamejorada7685 6 місяців тому

    Can you make it with a search bar?

    • @rohitprogrammer
      @rohitprogrammer  6 місяців тому +1

      Go through this video..!
      ua-cam.com/video/tnOB6Bn5F6A/v-deo.html

    • @lykamejorada7685
      @lykamejorada7685 6 місяців тому

      @@rohitprogrammer thank you

  • @DailyFMRadio
    @DailyFMRadio Рік тому

    How can I make it keep playing song by song?

  • @이진우-r2z8e
    @이진우-r2z8e 4 роки тому +1

    How can I play all files at list box automacally?

    • @rohitprogrammer
      @rohitprogrammer  4 роки тому

      You can play the next item by adding 1 to the selected Index and checking if the index is still within bounds
      Store the new index in a variable that will keep the new index until the item has been played or change the Selected Index directly, this will change the Selected Item and move the selection in the ListBox
      private int currentSongIndex = -1;
      void Player_MediaEnded(object sender, EventArgs e)
      {
      if(currentSongIndex == -1)
      {
      currentSongIndex = listBox.SelectedIndex;
      }
      currentSongIndex++;
      if(currentSongIndex < listBox.Items.Count)
      {
      player.Play(listBox.Items[currentSongIndex]);
      }
      else
      {
      // last song in listbox has been played
      }
      }

  • @jgglave9789
    @jgglave9789 3 роки тому

    Why does my error list say Cannot implicitly convert type 'string' to 'string[]'?

  • @fadifaris8518
    @fadifaris8518 3 роки тому

    what about if we want to delete
    items from the list

    • @rohitprogrammer
      @rohitprogrammer  3 роки тому +1

      Check the video called Add Save Delete Load Media Playlist files in C# Visual Studio
      ..hope it help... :)

  • @gabrielkasonde367
    @gabrielkasonde367 2 роки тому

    how to drag and drop a file onto the player ?

  • @jivan6459
    @jivan6459 2 роки тому

    (System.IndexOutOfRangeException: 'Index was outside the bounds of the array.') I'm getting this error on line
    (player.URL = paths[lstTrack.SelectedIndex];)

  • @usau6728
    @usau6728 3 роки тому

    how to make multiplex button for karaoke function

  • @fuadal-mrerr8267
    @fuadal-mrerr8267 3 роки тому

    No Source code file in the link u provided...

  • @Code_with_Iphie
    @Code_with_Iphie Рік тому

    How can I download tag lib

    • @rohitprogrammer
      @rohitprogrammer  Рік тому

      Rohit Programming Zone
      __________________
      To download TagLib, you can follow these steps:
      Go to the TagLib GitHub page at github.com/taglib/taglib.
      Click on the green "Code" button and select "Download ZIP" to download the latest version of TagLib as a ZIP file.
      Extract the contents of the ZIP file to a location of your choice.
      Alternatively, you can use Git to clone the TagLib repository to your local machine. Here are the steps to do that:
      Install Git on your system, if it is not already installed.
      Open a terminal or command prompt and navigate to the directory where you want to clone the TagLib repository.
      Type the following command to clone the TagLib repository: git clone github.com/taglib/taglib.git
      Wait for Git to finish cloning the repository to your local machine.
      After you have downloaded or cloned TagLib, you can follow the instructions in the README file to build and install the library on your system.