re-add conditional render to ReactPlayer components which causes crossfade error

This commit is contained in:
jeffvli
2025-11-06 20:23:22 -08:00
parent d6ea97fa2a
commit 9c3053608d
@@ -119,6 +119,7 @@ export const WebPlayerEngine = (props: WebPlayerEngineProps) => {
return ( return (
<div id="web-player-engine" style={{ display: 'none' }}> <div id="web-player-engine" style={{ display: 'none' }}>
{Boolean(src1) && (
<ReactPlayer <ReactPlayer
config={{ config={{
file: { attributes: { crossOrigin: 'anonymous' }, forceAudio: true }, file: { attributes: { crossOrigin: 'anonymous' }, forceAudio: true },
@@ -137,6 +138,8 @@ export const WebPlayerEngine = (props: WebPlayerEngineProps) => {
volume={volume1} volume={volume1}
width={0} width={0}
/> />
)}
{Boolean(src2) && (
<ReactPlayer <ReactPlayer
config={{ config={{
file: { attributes: { crossOrigin: 'anonymous' }, forceAudio: true }, file: { attributes: { crossOrigin: 'anonymous' }, forceAudio: true },
@@ -155,6 +158,7 @@ export const WebPlayerEngine = (props: WebPlayerEngineProps) => {
volume={volume2} volume={volume2}
width={0} width={0}
/> />
)}
</div> </div>
); );
}; };