From 5a379247c70a43592c8e3a660656678bb9d4ad00 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Mon, 22 Jul 2024 12:56:20 -0400 Subject: [PATCH] Add video size to dash manifest --- CHANGELOG.md | 1 + .../src/components/Services/Dash/DashManifest.bs | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d757888b..689ac7a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/playlet-lib/src/components/Services/Dash/DashManifest.bs b/playlet-lib/src/components/Services/Dash/DashManifest.bs index a03bd899..107c52a6 100644 --- a/playlet-lib/src/components/Services/Dash/DashManifest.bs +++ b/playlet-lib/src/components/Services/Dash/DashManifest.bs @@ -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