Below is my code, react native JW player version number 0.2.35 works fine for bacgroundAudioEnabled property, but after updating version to 0.2.37 property bacgroundAudioEnabled not working.
<ViewportAwareJWPlayer
innerRef={(ref) => (jWPlayerRef = ref)}
style={Style.videoContainer}
config={{
license: Platform.select({
ios: "...",
android: "...",
}),
autostart: true,
controls:true,
playlist: [
{
mediaId: "0",
image: WatchVideoData.thumbnail_file,
time: 0,
file: WatchVideoData.video_url,
autostart: false,
// controls: true,
repeat: false,
displayDescription: false,
displaytitle: false,
backgroundAudioEnabled: true,
fullScreenOnLandscape:true,
landscapeOnFullScreen:true,
},
],
hideUIGroups: ['casting_menu'],
backgroundAudioEnabled: true,
fullScreenOnLandscape:true,
landscapeOnFullScreen:true,
styling: {
colors: {},
},
pipEnabled: (platform == 'android') ? false : true,
}}
onViewportLeave={() => {
jWPlayerRef.pause();
}}
/>
As per my POV audio should play in background.