CrazyEngineers
  • need media plalyer source code in java....

    Updated: Oct 26, 2024
    Views: 1.2K
    can somebody provide me
    source code of media player in java
    i need to submit as my project and i have no lead
    so if any one can
    then please help
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Mahesh Dahale

    MemberNov 18, 2009

    This was my MCA FY Project it will help you

       import java.awt.*;
      import java.applet.*;
      import java.net.*;
       
      public class soundApplet extends Applet
      {
                  List lst;
                  Button Play,Stop,Loop;
                  AudioClip au;
                  public void init()
                  {
                              setLayout (new GridLayout());
       
                              Panel listPanel = new Panel();
                              Panel buttonPanel = new Panel();
       
                                          add ("Center", listPanel);
                                          add ("Left", buttonPanel);
       
                              listPanel.setLayout (new GridLayout());
       
                                          lst = new List();
                                             lst.addItem ("intel54");
       
                                          lst.addItem ("Windows XP Startup");
       
                                          lst.addItem ("Windows XP Shutdown");
       
                                          lst.addItem ("hi");
       
                                          lst.addItem ("notify");
                                          lst.select (0);
       
                              listPanel.add ("Center", lst);
       
                              Play = new Button ("Play");
       
                                          buttonPanel.add (Play);
       
                              Stop = new Button ("Stop");
       
                                          buttonPanel.add (Stop);
       
                              Loop = new Button ("Loop");
       
                                          buttonPanel.add (Loop);
                  }
                  public boolean action (Event evt, Object obj)
                  {
                              String strSelection = lst.getSelectedItem() + ".au";
       
                              URL codeBase = getCodeBase();
       
                              au = getAudioClip (codeBase, strSelection);
       
                              if (evt.target == Play)
                                          au.play();
       
                              if (evt.target == Stop)
                                          au.stop();
                              if (evt.target == Loop)
                                          au.loop();
       
                                          return true;
                              }
                  }
      
    
    For HTML page

       <html>
      <head>
      <title>
       
       Sound Applet </title>
      <body bgcolor="FFCCFF">
       
      <marquee bgcolor="#0000ff"loop="20"scrollamount="5"width="100%"<center>
      <H1><font color="#FF000">Sound Applet </font></H1></center></marquee><br>
       
      <br><br><br>
       
      <center><applet code="soundApplet.class" width=400 height=300></center>
       
      </applet>
      </body>
      </html>
      
    [​IMG]
    Are you sure? This action cannot be undone.
    Cancel
  • yadavundertaker mohit

    MemberNov 18, 2009

    thanks mahesh...
    Are you sure? This action cannot be undone.
    Cancel
  • oldboy1985

    MemberNov 19, 2009

    thanks
    i also needed that one
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register