Package extended

Source Code of extended.CurrentTrackDemo

package extended;



import com.jitcaforwin.extended.JitcaiTunesController;
import com.jitcaforwin.extended.api.IJitcaITunesController;
import com.jitcaforwin.extended.api.track.Track;
import com.jitcaforwin.main.exceptions.JitcaException;

public class CurrentTrackDemo {
  public static void main(String args[]) {
    try {
      IJitcaITunesController iTunes = new JitcaiTunesController(true);
      Track track = iTunes.getPlayerController().currentTrack();

      if (track == null) {
        System.out.println("Currently no track played!");
      } else {
        System.out.println(track.getTitle() + " by " + track.getArtist()
            + " is currently played. \n");
        ;
      }

      iTunes.close();

    } catch (JitcaException e) {
      e.printStackTrace();
    }

  }
}
TOP

Related Classes of extended.CurrentTrackDemo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.