|
|
|
@ -1,6 +1,10 @@
|
|
|
|
|
using DownKyi.Core.BiliApi.VideoStream.Models;
|
|
|
|
|
using DownKyi.Core.BiliApi.BiliUtils;
|
|
|
|
|
using DownKyi.Core.BiliApi.VideoStream.Models;
|
|
|
|
|
using DownKyi.Core.Utils;
|
|
|
|
|
using Prism.Commands;
|
|
|
|
|
using Prism.Mvvm;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
|
|
|
|
|
namespace DownKyi.ViewModels.PageViewModels
|
|
|
|
|
{
|
|
|
|
@ -43,8 +47,8 @@ namespace DownKyi.ViewModels.PageViewModels
|
|
|
|
|
set => SetProperty(ref duration, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<string> audioQualityFormatList;
|
|
|
|
|
public List<string> AudioQualityFormatList
|
|
|
|
|
private ObservableCollection<string> audioQualityFormatList;
|
|
|
|
|
public ObservableCollection<string> AudioQualityFormatList
|
|
|
|
|
{
|
|
|
|
|
get => audioQualityFormatList;
|
|
|
|
|
set => SetProperty(ref audioQualityFormatList, value);
|
|
|
|
@ -71,5 +75,37 @@ namespace DownKyi.ViewModels.PageViewModels
|
|
|
|
|
set => SetProperty(ref videoQuality, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region
|
|
|
|
|
|
|
|
|
|
// 视频画质选择事件
|
|
|
|
|
private DelegateCommand videoQualitySelectedCommand;
|
|
|
|
|
public DelegateCommand VideoQualitySelectedCommand => videoQualitySelectedCommand ?? (videoQualitySelectedCommand = new DelegateCommand(ExecuteVideoQualitySelectedCommand));
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 视频画质选择事件
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void ExecuteVideoQualitySelectedCommand()
|
|
|
|
|
{
|
|
|
|
|
// 杜比视界
|
|
|
|
|
string dolby = Constant.GetAudioQualities()[3].Name;
|
|
|
|
|
if (VideoQuality.Quality == 126)
|
|
|
|
|
{
|
|
|
|
|
ListHelper.AddUnique(AudioQualityFormatList, dolby);
|
|
|
|
|
AudioQualityFormat = dolby;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (AudioQualityFormatList.Contains(dolby))
|
|
|
|
|
{
|
|
|
|
|
AudioQualityFormatList.Remove(dolby);
|
|
|
|
|
AudioQualityFormat = AudioQualityFormatList[0];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|