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