示例#1
0
 private void Videotracks_OnPropertyChanged(object sender, EventArgs e)
 {
     if (!IsUpdating)
     {
         MediaTrackDescription mediaTrackDescription = sender as MediaTrackDescription;
         SetVideoTrack(mediaTrackDescription);
     }
 }
示例#2
0
 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;
        }
示例#4
0
        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;
        }
示例#5
0
        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;
        }