chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
190 stars 91 forks source link

backgroundAudioEnabled: true not working when playing live video specific in ios #311

Open DigenPrimeApps opened 1 year ago

DigenPrimeApps commented 1 year ago

My code

<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, }} // onViewportEnter={() => console.log(${data.title} Entered!)} onViewportLeave={() => { //jWPlayerRef.current.pause(); //console.log("jWPlayerRef.current ", jWPlayerRef); jWPlayerRef.pause(); // console.log(${data.title} Left!); }} onSetupPlayerError={ErrorHandle} onPlayerError={ErrorHandle} onPlay={onPlayHandle} onPause={onPauseHandle} />