Commit 2b85b36d authored by Martin Finkel's avatar Martin Finkel

Add IsDesignModeEnabled check

parent f47fbbbc
......@@ -6,12 +6,14 @@ namespace PulseMusic
{
public class PlaybackService
{
LibVLC _libVLC;
MediaPlayer _mp;
readonly LibVLC _libVLC;
readonly MediaPlayer _mp;
const long OFFSET = 5000;
public PlaybackService()
{
if (DesignMode.IsDesignModeEnabled) return;
Core.Initialize();
_libVLC = new LibVLC();
......@@ -25,10 +27,6 @@ namespace PulseMusic
_mp.Media.AddOption(":no-video");
_mp.Media.Parse();
var artist = _mp.Media.Meta(Media.MetadataType.Artist);
_mp.TimeChanged += TimeChanged;
_mp.PositionChanged += PositionChanged;
_mp.LengthChanged += LengthChanged;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment