mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
re-add conditional render to ReactPlayer components which causes crossfade error
This commit is contained in:
@@ -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>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user