1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-26 01:17:30 +00:00

Use second__order to sort formats

This commit is contained in:
Cadence Ember 2020-08-25 01:50:03 +12:00
parent 9db801c0d5
commit 8e991990bf

View File

@ -9,7 +9,7 @@ block head
block content
- const sortedFormatStreams = video.formatStreams.slice().sort((a, b) => b.second__height - a.second__height)
- const sortedVideoAdaptiveFormats = video.adaptiveFormats.filter(f => f.type.startsWith("video")).sort((a, b) => b.second__height - a.second__height)
- const sortedVideoAdaptiveFormats = video.adaptiveFormats.filter(f => f.type.startsWith("video")).sort((a, b) => a.second__order - b.second__order)
main.video-page
.main-video-section
.video-container