private void Videotracks_OnPropertyChanged(object sender, EventArgs e) { if (!IsUpdating) { MediaTrackDescription mediaTrackDescription = sender as MediaTrackDescription; SetVideoTrack(mediaTrackDescription); } }
private void Subtitlelist_OnPropertyChanged(object sender, EventArgs e) { if (!IsUpdating) { MediaTrackDescription mediaTrackDescription = sender as MediaTrackDescription; SetSubtitle(mediaTrackDescription); } }
private void SetAudioTrack(MediaTrackDescription mediaTrackDescription) { this.IsUpdating = true; foreach (var item in audiotracks) { if (item != mediaTrackDescription) { item.IsSelected = false; } else { item.IsSelected = true; } } audiotrack = mediaTrackDescription; mediaplayer.AudioTrack = mediaTrackDescription.Id; this.IsUpdating = false; }
private void SetVideoTrack(MediaTrackDescription mediaTrackDescription) { this.IsUpdating = true; foreach (var item in videotracks) { if (item != mediaTrackDescription) { item.IsSelected = false; } else { item.IsSelected = true; } } videotrack = mediaTrackDescription; mediaplayer.VlcMediaPlayer.VideoTrack = mediaTrackDescription.Id; this.IsUpdating = false; }
private void SetSubtitle(MediaTrackDescription mediaTrackDescription) { this.IsUpdating = true; foreach (var item in subtitlelist) { if (item != mediaTrackDescription) { item.IsSelected = false; } else { item.IsSelected = true; } } subtitle = mediaTrackDescription; mediaplayer.VlcMediaPlayer.Subtitle = mediaTrackDescription.Id; this.IsUpdating = false; }