mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-06 00:00:10 +00:00
Fixed DASH generation with subtitles.
This commit is contained in:
parent
8950bd94cb
commit
196e55899e
1 changed files with 4 additions and 3 deletions
|
@ -88,7 +88,8 @@ class DashBuilder : XMLBuilder {
|
||||||
fun withRepresentationOnDemand(id: String, subtitleSource: ISubtitleSource, subtitleUrl: String) {
|
fun withRepresentationOnDemand(id: String, subtitleSource: ISubtitleSource, subtitleUrl: String) {
|
||||||
withRepresentation(id, mapOf(
|
withRepresentation(id, mapOf(
|
||||||
Pair("mimeType", subtitleSource.format ?: "text/vtt"),
|
Pair("mimeType", subtitleSource.format ?: "text/vtt"),
|
||||||
Pair("startWithSAP", "1"),
|
Pair("default", "true"),
|
||||||
|
Pair("lang", "en"),
|
||||||
Pair("bandwidth", "1000")
|
Pair("bandwidth", "1000")
|
||||||
)) {
|
)) {
|
||||||
it.withBaseURL(subtitleUrl)
|
it.withBaseURL(subtitleUrl)
|
||||||
|
@ -151,7 +152,7 @@ class DashBuilder : XMLBuilder {
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
//TODO: Verify if & really should be replaced like this?
|
//TODO: Verify if & really should be replaced like this?
|
||||||
it.withRepresentationOnDemand("1", subtitleSource, subtitleUrl.replace("&", "&"))
|
it.withRepresentationOnDemand("caption_en", subtitleSource, subtitleUrl.replace("&", "&"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Video
|
//Video
|
||||||
|
@ -164,7 +165,7 @@ class DashBuilder : XMLBuilder {
|
||||||
Pair("subsegmentStartsWithSAP", "1")
|
Pair("subsegmentStartsWithSAP", "1")
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
it.withRepresentationOnDemand("1", vidSource, vidUrl.replace("&", "&"));
|
it.withRepresentationOnDemand("2", vidSource, vidUrl.replace("&", "&"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue