Open fdobre opened 4 months ago
@fdobre Hey, thank you for reporting this issue. Can you share your player configuration/setup implementation? This can happen if no audio track is designated the default.
@AmitaiB
const memoizedTracks = useMemo<Track[]>(() => {
const tracks: Track[] = (captions || [])?.map(item => {
return {
file: item?.file ?? '',
label: item?.label ?? '',
kind: 'captions',
default:
(item?.languageCode || '').toLowerCase() === languageCode
? true
: isAndroid
? false
: undefined
};
});
if (thumbnailPreviews) {
tracks.push({
file: thumbnailPreviews,
kind: 'thumbnails',
label: 'thumbnails'
});
}
return tracks;
}, [languageCode, captions, thumbnailPreviews]);
const playlistItem = useMemo(
() => ({
image,
file: hlsUrl,
tracks: memoizedTracks ?? []
}),
[hlsUrl, image, memoizedTracks]
);
const jwConfig: Config = useMemo(
() => ({
license: isIOS
? config.jwPlayerIOSLicense
: config.jwPlayerAndroidLicense,
enableLockScreenControls: false, // iOS only
// Having PiP enabled on Android triggers a crash if advertisments (pre-rolls) are also enabled, retest this after JWP update
pipEnabled: isIOS,
backgroundAudioEnabled: false,
autostart: true,
playlist: [playlistItem],
styling: {
menuStyle: {
backgroundColour: 'rgba(51, 51, 51, 1)',
fontColor: 'rgba(255, 255, 255, 0.8)'
},
colours: {
timeslider: {
progress: '#ff1541',
rail: 'rgba(255, 255, 255, 0.3)'
}
}
},
advertising: isPremium
? undefined
: {
adClient: 'vast',
adSchedule: [{ offset: 'pre', tag: vastTag }]
},
landscapeOnFullScreen: true,
fullScreenOnLandscape: isAndroid,
portraitOnExitFullScreen: true, // Supported for Android only
exitFullScreenOnPortrait: isAndroid,
hideUiGroups: ['casting_menu'],
hideCastIcon: isAndroid ? true : undefined // We had to add a patch in RN-JWPlayer to hide the cast button
}),
[playlistItem, isPremium, vastTag]
);
Hope this helps. If any other additional info is needed please let me know.
Describe the bug
When providing multiple audio tracks video has absolutely no sound.
After switching to another track sound works but switching back to the default track triggers an 1008 error.
Multiple audio tracks support doesn't have the above issue in Android.
To Reproduce
Expected behavior Audio tracks should work as in Android. Default audio track should have sound and when switching back to the default audio track there should be no error and sound should work.