We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 116b044 commit 68b1d81Copy full SHA for 68b1d81
1 file changed
dotcom-rendering/src/lib/video.ts
@@ -39,6 +39,15 @@ const isSupportedMimeType = (
39
export const convertAssetsToVideoSources = (assets: VideoAssets[]): Source[] =>
40
assets
41
.filter((asset) => isSupportedMimeType(asset.mimeType))
42
+ .sort(
43
+ (a, b) =>
44
+ supportedVideoFileTypes.indexOf(
45
+ a.mimeType as SupportedVideoFileType,
46
+ ) -
47
48
+ b.mimeType as SupportedVideoFileType,
49
+ ),
50
+ )
51
.map((asset) => ({
52
src: asset.url,
53
mimeType: asset.mimeType as Source['mimeType'],
0 commit comments