Search code examples
c#itunes

How to play/set songs/radio station in itunes using API


i m making a Windows Application which work over ITunes. Currently i m able to find the location of a song (which is on local machine ) and URL ( which is running from stream like radio, podcast at the time of buffering)

Is it easy to play a song which is on local Machine..

obj = new iTunesAppClass();
obj.PlayFile(@"d:/4.mp3")

but when i tries the url inside playfile() method it doesn't work is there another way to play online songs/radio ?

We can see play method here


Solution

  • if you want to open an Url you should use the OpenUrl() Method.

    obj.OpenURL("http://108.166.161.205:8795");