JW player react native issue : backgroundAudioEnabled: true not working when playing live video specific in ios

93 Views Asked by At

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.

0

There are 0 best solutions below