public void Play(AudioType audioType, string fileName) { switch (audioType) { case AudioType.Mp3: Console.WriteLine("Playing Mp3 file.FileName = " + fileName); break; case AudioType.Vlc: case AudioType.Mp4: case AudioType.Avi: m_mediaAdapter = new MediaAdapter(audioType); m_mediaAdapter.Play(audioType, fileName); break; } }
public void play(string audioType, string filename) { if (audioType.Equals("MP3")) { Console.WriteLine("Playing mp3 file. Name : {0}", filename); } else if (audioType.Equals("VLC") || audioType.Equals("MP4")) { mediaAdapter = new MediaAdapter(audioType); mediaAdapter.play(audioType, filename); } else { Console.WriteLine("Invalid media {0} format not supported.", audioType); } }