Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Bili.Uwp
提交
deee4e67
B
Bili.Uwp
项目概览
jobily
/
Bili.Uwp
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Bili.Uwp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
deee4e67
编写于
6月 02, 2023
作者:
R
Richasy
提交者:
GitHub
6月 02, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复PGC内容无法播放以及自动生成字幕未显示的问题 (#1705)
* 修复自动生成的字幕没有显示的问题 * 修复PGC内容播放问题
上级
e5f05aed
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
29 addition
and
22 deletion
+29
-22
src/App/App.csproj
src/App/App.csproj
+1
-1
src/App/Assets/DashVideoTemplate.xml
src/App/Assets/DashVideoTemplate.xml
+7
-8
src/App/Assets/DashVideoWithoutAudioTemplate.xml
src/App/Assets/DashVideoWithoutAudioTemplate.xml
+2
-3
src/Lib/DI.App/DI.App.csproj
src/Lib/DI.App/DI.App.csproj
+1
-1
src/Lib/DI.Container/DI.Container.csproj
src/Lib/DI.Container/DI.Container.csproj
+1
-1
src/Lib/FrostMaster.Uwp/FrostMaster.Uwp.csproj
src/Lib/FrostMaster.Uwp/FrostMaster.Uwp.csproj
+1
-1
src/Lib/Lib.Implementation/PlayerProvider/PlayerProvider.Extension.cs
...Implementation/PlayerProvider/PlayerProvider.Extension.cs
+2
-1
src/Lib/Lib.Implementation/PlayerProvider/PlayerProvider.cs
src/Lib/Lib.Implementation/PlayerProvider/PlayerProvider.cs
+1
-1
src/Models/Models.Data/Player/SegmentInformation.cs
src/Models/Models.Data/Player/SegmentInformation.cs
+8
-1
src/Utilities/Toolkit/Toolkit.Uwp/Toolkit.Uwp.csproj
src/Utilities/Toolkit/Toolkit.Uwp/Toolkit.Uwp.csproj
+1
-1
src/ViewModels/ViewModels.Uwp/Core/NativePlayerViewModel/NativePlayerViewModel.Methods.cs
...re/NativePlayerViewModel/NativePlayerViewModel.Methods.cs
+3
-2
src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj
src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj
+1
-1
未找到文件。
src/App/App.csproj
浏览文件 @
deee4e67
...
...
@@ -1330,7 +1330,7 @@
<Version>
2.8.2-prerelease.220830001
</Version>
</PackageReference>
<PackageReference
Include=
"Newtonsoft.Json"
>
<Version>
13.0.
2
</Version>
<Version>
13.0.
3
</Version>
</PackageReference>
<PackageReference
Include=
"Richasy.FluentIcon.Regular.UWP"
>
<Version>
1.1.150
</Version>
...
...
src/App/Assets/DashVideoTemplate.xml
浏览文件 @
deee4e67
<MPD
xmlns=
"urn:mpeg:DASH:schema:MPD:2011"
profiles=
"urn:mpeg:dash:profile:isoff-on-demand:2011"
type=
"static"
minBufferTime=
"{bufferTime}"
>
<MPD
xmlns=
"urn:mpeg:DASH:schema:MPD:2011"
profiles=
"urn:mpeg:dash:profile:isoff-on-demand:2011"
type=
"static"
>
<Period
start=
"PT0S"
>
<AdaptationSet
group=
"1"
>
<ContentComponent
contentType=
"audio"
id=
"1"
/>
{audio}
</AdaptationSet>
<AdaptationSet
group=
"2"
>
<ContentComponent
contentType=
"video"
id=
"2"
/>
<AdaptationSet>
<ContentComponent
contentType=
"video"
id=
"1"
/>
{video}
</AdaptationSet>
<AdaptationSet>
<ContentComponent
contentType=
"audio"
id=
"2"
/>
{audio}
</AdaptationSet>
</Period>
</MPD>
src/App/Assets/DashVideoWithoutAudioTemplate.xml
浏览文件 @
deee4e67
<MPD
xmlns=
"urn:mpeg:DASH:schema:MPD:2011"
profiles=
"urn:mpeg:dash:profile:isoff-on-demand:2011"
type=
"static"
minBufferTime=
"{bufferTime}"
>
<MPD
xmlns=
"urn:mpeg:DASH:schema:MPD:2011"
profiles=
"urn:mpeg:dash:profile:isoff-on-demand:2011"
type=
"static"
>
<Period
start=
"PT0S"
>
<AdaptationSet
group=
"1"
>
<AdaptationSet>
<ContentComponent
contentType=
"video"
id=
"1"
/>
{video}
</AdaptationSet>
...
...
src/Lib/DI.App/DI.App.csproj
浏览文件 @
deee4e67
...
...
@@ -129,7 +129,7 @@
<Version>
6.2.14
</Version>
</PackageReference>
<PackageReference
Include=
"NLog"
>
<Version>
5.
1.1
</Version>
<Version>
5.
2.0
</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
...
...
src/Lib/DI.Container/DI.Container.csproj
浏览文件 @
deee4e67
...
...
@@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Autofac" Version="7.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="NLog" Version="5.
1.3
" />
<PackageReference Include="NLog" Version="5.
2.0
" />
</ItemGroup>
</Project>
src/Lib/FrostMaster.Uwp/FrostMaster.Uwp.csproj
浏览文件 @
deee4e67
...
...
@@ -135,7 +135,7 @@
<Version>
6.2.14
</Version>
</PackageReference>
<PackageReference
Include=
"Newtonsoft.Json"
>
<Version>
13.0.
2
</Version>
<Version>
13.0.
3
</Version>
</PackageReference>
<PackageReference
Include=
"Win2D.uwp"
>
<Version>
1.26.0
</Version>
...
...
src/Lib/Lib.Implementation/PlayerProvider/PlayerProvider.Extension.cs
浏览文件 @
deee4e67
...
...
@@ -80,6 +80,7 @@ namespace Bili.Lib
var
isPgc
=
string
.
IsNullOrEmpty
(
aid
)
&&
!
string
.
IsNullOrEmpty
(
seasonType
);
var
url
=
isPgc
?
ApiConstants
.
Pgc
.
PlayInformation
(
proxy
)
:
ApiConstants
.
Video
.
PlayInformation
;
var
requestType
=
isPgc
?
RequestClientType
.
Web
:
RequestClientType
.
IOS
;
var
queryParameters
=
new
Dictionary
<
string
,
string
>
{
...
...
@@ -113,7 +114,7 @@ namespace Bili.Lib
otherQuery
=
$"area=
{
area
}
"
;
}
var
request
=
await
_httpProvider
.
GetRequestMessageAsync
(
HttpMethod
.
Get
,
url
,
queryParameters
,
RequestClientType
.
IOS
,
additionalQuery
:
otherQuery
);
var
request
=
await
_httpProvider
.
GetRequestMessageAsync
(
HttpMethod
.
Get
,
url
,
queryParameters
,
requestType
,
additionalQuery
:
otherQuery
);
var
response
=
await
_httpProvider
.
SendAsync
(
request
);
var
data
=
await
_httpProvider
.
ParseAsync
<
ServerResponse
<
PlayerInformation
>,
ServerResponse2
<
PlayerInformation
>>(
response
,
(
str
)
=>
{
...
...
src/Lib/Lib.Implementation/PlayerProvider/PlayerProvider.cs
浏览文件 @
deee4e67
...
...
@@ -333,7 +333,7 @@ namespace Bili.Lib
url
=
"https:"
+
url
;
}
var
request
=
await
_httpProvider
.
GetRequestMessageAsync
(
HttpMethod
.
Get
,
url
);
var
request
=
await
_httpProvider
.
GetRequestMessageAsync
(
HttpMethod
.
Get
,
url
,
type
:
RequestClientType
.
IOS
,
needCookie
:
true
);
var
response
=
await
_httpProvider
.
SendAsync
(
request
);
var
result
=
await
_httpProvider
.
ParseAsync
<
SubtitleDetailResponse
>(
response
);
return
result
.
Body
.
Select
(
p
=>
_playerAdapter
.
ConvertToSubtitleInformation
(
p
)).
ToList
();
...
...
src/Models/Models.Data/Player/SegmentInformation.cs
浏览文件 @
deee4e67
...
...
@@ -32,7 +32,8 @@ namespace Bili.Models.Data.Player
int
width
,
int
height
,
string
initialization
,
string
indexRange
)
string
indexRange
,
int
startWithSap
=
1
)
{
Id
=
id
;
BaseUrl
=
baseUrl
;
...
...
@@ -44,6 +45,7 @@ namespace Bili.Models.Data.Player
Height
=
height
;
Initialization
=
initialization
;
IndexRange
=
indexRange
;
StartWithSap
=
startWithSap
;
}
/// <summary>
...
...
@@ -96,6 +98,11 @@ namespace Bili.Models.Data.Player
/// </summary>
public
string
IndexRange
{
get
;
}
/// <summary>
/// None.
/// </summary>
public
int
StartWithSap
{
get
;
}
/// <inheritdoc/>
public
override
bool
Equals
(
object
obj
)
=>
obj
is
SegmentInformation
information
&&
Id
==
information
.
Id
;
...
...
src/Utilities/Toolkit/Toolkit.Uwp/Toolkit.Uwp.csproj
浏览文件 @
deee4e67
...
...
@@ -29,7 +29,7 @@
<Version>
6.2.14
</Version>
</PackageReference>
<PackageReference
Include=
"Newtonsoft.Json"
>
<Version>
13.0.
2
</Version>
<Version>
13.0.
3
</Version>
</PackageReference>
<PackageReference
Include=
"ToolGood.Words"
>
<Version>
3.0.3.1
</Version>
...
...
src/ViewModels/ViewModels.Uwp/Core/NativePlayerViewModel/NativePlayerViewModel.Methods.cs
浏览文件 @
deee4e67
...
...
@@ -23,7 +23,7 @@ namespace Bili.ViewModels.Uwp.Core
private
HttpClient
GetVideoClient
()
{
var
httpClient
=
new
HttpClient
();
httpClient
.
DefaultRequestHeaders
.
Referer
=
new
Uri
(
"https://www.bilibili.com"
);
httpClient
.
DefaultRequestHeaders
.
Add
(
"Referer"
,
"https://www.bilibili.com"
);
httpClient
.
DefaultRequestHeaders
.
Add
(
"User-Agent"
,
ServiceConstants
.
DefaultUserAgentString
);
return
httpClient
;
}
...
...
@@ -37,7 +37,7 @@ namespace Bili.ViewModels.Uwp.Core
var
mpdStr
=
await
_fileToolkit
.
ReadPackageFile
(
mpdFilePath
);
var
videoStr
=
$@"<Representation bandwidth=""
{
_video
.
Bandwidth
}
"" codecs=""
{
_video
.
Codecs
}
"" height=""
{
_video
.
Height
}
"" mimeType=""
{
_video
.
MimeType
}
"" id=""
{
_video
.
Id
}
"" width=""
{
_video
.
Width
}
"">
$@"<Representation bandwidth=""
{
_video
.
Bandwidth
}
"" codecs=""
{
_video
.
Codecs
}
"" height=""
{
_video
.
Height
}
"" mimeType=""
{
_video
.
MimeType
}
"" id=""
{
_video
.
Id
}
"" width=""
{
_video
.
Width
}
""
startWithSap=""
{
_video
.
StartWithSap
}
""
>
<BaseURL></BaseURL>
<SegmentBase indexRange=""
{
_video
.
IndexRange
}
"">
<Initialization range=""
{
_video
.
Initialization
}
"" />
...
...
@@ -65,6 +65,7 @@ namespace Bili.ViewModels.Uwp.Core
var
stream
=
new
MemoryStream
(
Encoding
.
UTF8
.
GetBytes
(
mpdStr
)).
AsInputStream
();
var
source
=
await
AdaptiveMediaSource
.
CreateFromStreamAsync
(
stream
,
new
Uri
(
_video
.
BaseUrl
),
"application/dash+xml"
,
httpClient
);
source
.
MediaSource
.
AdvancedSettings
.
AllSegmentsIndependent
=
true
;
Debug
.
Assert
(
source
.
Status
==
AdaptiveMediaSourceCreationStatus
.
Success
,
"解析MPD失败"
);
source
.
MediaSource
.
DownloadRequested
+=
(
sender
,
args
)
=>
{
...
...
src/ViewModels/ViewModels.Uwp/ViewModels.Uwp.csproj
浏览文件 @
deee4e67
...
...
@@ -222,7 +222,7 @@
<Version>
7.1.3
</Version>
</PackageReference>
<PackageReference
Include=
"NLog"
>
<Version>
5.
1.1
</Version>
<Version>
5.
2.0
</Version>
</PackageReference>
<PackageReference
Include=
"QueryString.NET"
>
<Version>
1.0.0
</Version>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录