Sort qualites on android

This commit is contained in:
Zoe Roux 2024-03-31 23:08:06 +02:00
parent a8d29b5b26
commit 0008aa95c2
No known key found for this signature in database

View File

@ -174,17 +174,19 @@ export const QualitiesMenu = (props: CustomMenu) => {
/> />
{/* TODO: Support video tracks when the play mode is not hls. */} {/* TODO: Support video tracks when the play mode is not hls. */}
{/* @ts-expect-error They forgot to type this. */} {/* @ts-expect-error They forgot to type this. */}
{info?.videoTracks.map((x) => ( {info?.videoTracks
<Menu.Item .sort((a: any, b: any) => b.height - a.height)
key={x.height} .map((x: any, i: number) => (
label={`${x.height}p`} <Menu.Item
selected={video === x.height} key={i}
onSelect={() => { label={`${x.height}p`}
setPlayMode(PlayMode.Hls); selected={video === x.height}
setVideo(x.height); onSelect={() => {
}} setPlayMode(PlayMode.Hls);
/> setVideo(x.height);
))} }}
/>
))}
</Menu> </Menu>
); );
}; };