Skip to content
Ondrej Medek edited this page Aug 25, 2017 · 8 revisions

Headless Examples

Examples of using WPF-MediaKit headless - without GUI, e.g. as a service.

Playing Sounds

static void Main(string[] args)
{
    _player = new MediaUriPlayer();
    _player.EnsureThread(ApartmentState.MTA);
    _player.Dispatcher.BeginInvoke(() =>
    {
        _player.Source = new Uri("[MyUri]"); // mp3, wma, m3u, ...
        _player.Play();
    });
    Console.ReadKey();
}
Clone this wiki locally