Last active
January 14, 2020 13:35
-
-
Save Delaire/dfaf4e1d0e81190f69ab8a8f986499f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StreamPlaybackService : INotifyPropertyChanged | |
{ | |
private readonly LibVLC _libVLC; | |
private MediaPlayer _appMediaPlayer; | |
public MediaPlayer AppMediaPlayer | |
{ | |
get | |
{ | |
return _appMediaPlayer; | |
} | |
set | |
{ | |
if (value != _appMediaPlayer) | |
{ | |
_appMediaPlayer = value; | |
OnPropertyChanged("appMediaPlayer"); | |
} | |
} | |
} | |
private StreamPlaybackService() | |
{ | |
//init vlc core lib | |
Core.Initialize(); | |
//init vlc media | |
_libVLC = new LibVLC(); | |
//android media player | |
AppMediaPlayer = new MediaPlayer(_libVLC); | |
AppMediaPlayer.EncounteredError += AppMediaPlayer_EncounteredError; | |
AppMediaPlayer.Buffering += AppMediaPlayer_Buffering; ; | |
AppMediaPlayer.Opening += AppMediaPlayer_Opening; | |
AppMediaPlayer.Playing += AppMediaPlayer_Playing; | |
AppMediaPlayer.Paused += AppMediaPlayer_Paused; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment