mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:33:26 +00:00
chore: prettier
This commit is contained in:
@@ -173,16 +173,18 @@ const captionTypeToTextTracksType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function convertCaptionsToTextTracks(captions: Caption[]): TextTracks {
|
function convertCaptionsToTextTracks(captions: Caption[]): TextTracks {
|
||||||
return captions.map((caption) => {
|
return captions
|
||||||
if (Platform.OS === "ios" && caption.type !== "vtt") {
|
.map((caption) => {
|
||||||
return null;
|
if (Platform.OS === "ios" && caption.type !== "vtt") {
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: caption.language,
|
title: caption.language,
|
||||||
language: caption.language as ISO639_1,
|
language: caption.language as ISO639_1,
|
||||||
type: captionTypeToTextTracksType[caption.type],
|
type: captionTypeToTextTracksType[caption.type],
|
||||||
uri: caption.url,
|
uri: caption.url,
|
||||||
};
|
};
|
||||||
}).filter(Boolean) as TextTracks;
|
})
|
||||||
|
.filter(Boolean) as TextTracks;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user