コード例 #1
0
 public PlaybackService()
 {
     _playlistService = new PlaylistService(this);
     _playlistService.OnPlaylistEndReached  += () => OnPlaylistEndReached?.Invoke();
     _playlistService.OnPlaylistChanged     += () => OnPlaylistChanged?.Invoke();
     _playlistService.OnCurrentMediaChanged += onCurrentMediaChanged;
     _playlistService.OnRepeatChanged       += (v) => OnRepeatChanged?.Invoke(v);
     PlayingType = PlayingType.NotPlaying;
 }
コード例 #2
0
ファイル: PlaylistService.cs プロジェクト: yueyz818/vlc-winrt
 private void OnMediaEndReached()
 {
     if (CanGoNext == false)
     {
         if (!Repeat)
         {
             OnPlaylistEndReached?.Invoke();
             // Don't use the Index property, this would cause the listener to start playback immediately
             _index = 0;
             OnCurrentMediaChanged?.Invoke(CurrentMedia, true);
             return;
         }
         Index = 0;
     }
     else
     {
         Index++;
     }
 }