diff --git a/lib/dash.js b/lib/dash.js index bb4ce60..9160dcf 100644 --- a/lib/dash.js +++ b/lib/dash.js @@ -406,6 +406,8 @@ const parseManifest = async (text, url, fallbackLanguage) => { } } + videos.sort((a, b) => b.bitrate.bps - a.bitrate.bps); + return { duration, tracks: {