I have submitted my react-native-tvos app to the Amazon store but they give below a functionality validation error.
FireTV-24- Media: Returning to the app from Sleep (System Standby) mode causes inconsistent behavior resulting in a negative user experience - Remote and Gamepad
Steps to reproduce:
- Install and launch the app
- Play any video
- Long press Home button to invoke HUD (Heads UP Display) overlay
- Select Sleep to put the device to Sleep mode
- Select any button to come out of sleep mode and relaunch the app Actual Result: observe that app audio continues to play in background Expected Result: Returning back from sleep mode should not result in inconsistent behavior of the app
I have used below version of tvos and React native video.
"react-native": "npm:[email protected]",
"react-native-video": "^5.2.1"
here is my code for video component.
<Video
ref={setPlayer}
subtitle={true}
source={{
uri: configuration.url,
}}
title={title}
subTitleText={subtitle}
style={[styles.playerLoaded]}
paused={pausedRef.current}
onLoad={handleLoad}
resizeMode={'contain'}
rate={playerRate}
onProgress={handleProgress}
onError={onError}
onLoadStart={onLoadStart}
onSeek={handleSeek}
onReadyForDisplay={onReadyForDisplay}
onEnd={onEndVideo}
playInBackground={false}
playWhenInactive={false}
/>
here i attached screenshot of error given by amazon.
please help me to fix this issue. Thank you in advance.
It could be a bug in that specific version of the component. Anyway you can use the AppState to perform an action every time the app goes in background
Example: