Fix a case where someone's audio could be missing if the audio track
arrived late
This commit is contained in:
parent
51ae1c819a
commit
88cffdb70e
1 changed files with 1 additions and 6 deletions
|
@ -213,12 +213,7 @@ export const useSpatialMediaStream = (
|
||||||
const sourceRef = useRef<MediaStreamAudioSourceNode>();
|
const sourceRef = useRef<MediaStreamAudioSourceNode>();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (spatialAudio && tileRef.current && !mute) {
|
||||||
spatialAudio &&
|
|
||||||
tileRef.current &&
|
|
||||||
!mute &&
|
|
||||||
stream.getAudioTracks().length > 0
|
|
||||||
) {
|
|
||||||
if (!pannerNodeRef.current) {
|
if (!pannerNodeRef.current) {
|
||||||
pannerNodeRef.current = new PannerNode(audioContext, {
|
pannerNodeRef.current = new PannerNode(audioContext, {
|
||||||
panningModel: "HRTF",
|
panningModel: "HRTF",
|
||||||
|
|
Loading…
Reference in a new issue