Skip to content

Commit

Permalink
Add video size to dash manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha committed Jul 22, 2024
1 parent ac36d11 commit 5a37924
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Added

- Sort options to channel live streams
- Video width and height to DASH manifest

## [0.24.6] - 2024-07-08

Expand Down
11 changes: 11 additions & 0 deletions playlet-lib/src/components/Services/Dash/DashManifest.bs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,17 @@ class DashManifest
LogWarn("Invalid video stream index, itag:", stream.itag)
continue for
end if

if (stream.width = invalid or stream.height = invalid) and not StringUtils.IsNullOrEmpty(stream.size)
if stream.size.instr("x") > 0
parts = stream.size.Tokenize("x")
if parts.Count() = 2
stream.width = ValidInt(parts[0].toInt())
stream.height = ValidInt(parts[1].toInt())
end if
end if
end if

videoStreams.Push(stream)
end if
end for
Expand Down

0 comments on commit 5a37924

Please sign in to comment.