import React from 'react'; import { Text, View } from 'react-native'; import type { PlayerError } from 'react-native-theoplayer'; import { PlayerContext, UiContext } from '../util/PlayerContext'; import { SvgContext } from '../button/svg/SvgUtils'; import { ErrorSvg } from '../button/svg/ErrorSvg'; import { FULLSCREEN_CENTER_STYLE } from '../uicontroller/UiContainer'; export interface ErrorDisplayProps { /** * The error that will be displayed. */ error: PlayerError; } /** * A fullscreen error component for the `react-native-theoplayer` UI. */ export function ErrorDisplay(props: ErrorDisplayProps) { const { error } = props; return ( {(context: UiContext) => ( Error: {context.locale.errorMessage({ error })} )} ); }