public void Initialize(IHLSController controller, MediaPlayer player) { _data = new PlaybackStatusData(controller, player); this.DataContext = _data; _player = player; _controller = controller; _player.MediaOpened += _player_MediaOpened; _player.SeekCompleted += _player_SeekCompleted; _controller.PrepareResourceRequest += _controller_PrepareResourceRequest; }
public void Reset() { if (_data != null) { _data.Reset(); } if (_player != null) { _player.MediaOpened -= _player_MediaOpened; } if (_controller != null) { _controller.PrepareResourceRequest -= _controller_PrepareResourceRequest; } _data = null; this.DataContext = null; noplaybackStatus.Visibility = Visibility.Visible; }
public void Reset() { if (_data != null) _data.Reset(); if (_player != null) _player.MediaOpened -= _player_MediaOpened; if (_controller != null) _controller.PrepareResourceRequest -= _controller_PrepareResourceRequest; _data = null; this.DataContext = null; noplaybackStatus.Visibility = Visibility.Visible; }