@theoplayer/react-native-ui
Version:
A React Native UI for @theoplayer/react-native
75 lines (74 loc) • 1.6 kB
JavaScript
/**
* The localized strings used in the player's user interface.
*/
export const defaultLocale = {
backButton: 'Back',
settingsTitle: 'Settings',
qualityTitle: 'Video Quality',
audioTitle: 'Audio',
subtitleTitle: 'Subtitles',
playbackRateTitle: 'Playback Speed',
liveLabel: 'LIVE',
automaticQualitySelectionLabel: 'auto',
qualityLabel: ({
label,
height,
bitrate,
unit
}) => {
if (label) return label;
if (height) return `${height}p`;
return `${bitrate}${unit}`;
},
qualityLabelExtended: ({
label,
height,
bitrate,
unit
}) => {
if (label) return label;
const isHD = height >= 720;
if (height) return `${height}p - ${bitrate}${unit} ${isHD ? '(HD)' : ''}`;
return `${bitrate}${unit} ${isHD ? '(HD)' : ''}`;
},
playbackRateLabel: ({
rate
}) => {
if (rate === 1) return 'Normal';
return `${rate}x`;
},
adProgress: ({
currentAd,
totalAds
}) => {
return totalAds > 1 ? `Ad ${currentAd} of ${totalAds}` : 'Ad';
},
adSkipCounter: ({
seconds
}) => {
return `Skip in ${Math.ceil(seconds)}s`;
},
adSkip: 'Skip Ad',
adCountdown: ({
remainingDuration
}) => {
return `Content will resume in ${Math.ceil(remainingDuration)}s`;
},
adClickThroughButton: 'Visit Advertiser',
castConnecting: ({
target
}) => {
return `Connecting to ${target} ...`;
},
castConnected: ({
target
}) => {
return `Playing on ${target}`;
},
errorMessage: ({
error
}) => {
return error.errorMessage;
}
};
//# sourceMappingURL=Locale.js.map