Fix handling of streams with no audio tracks

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2022-08-13 18:16:24 +02:00
parent 8f95da4b07
commit 2234962acc
No known key found for this signature in database
GPG key ID: D1D45825D60C24D2
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ export function VideoTileContainer({
audioOutputDevice, audioOutputDevice,
audioContext, audioContext,
audioDestination, audioDestination,
isLocal, isLocal || audioMuted,
localVolume localVolume
); );
const { const {

View file

@ -213,7 +213,7 @@ export const useSpatialMediaStream = (
const sourceRef = useRef<MediaStreamAudioSourceNode>(); const sourceRef = useRef<MediaStreamAudioSourceNode>();
useEffect(() => { useEffect(() => {
if (spatialAudio && tileRef.current && !mute) { if (spatialAudio && audioContext && tileRef.current && !mute) {
if (!pannerNodeRef.current) { if (!pannerNodeRef.current) {
pannerNodeRef.current = new PannerNode(audioContext, { pannerNodeRef.current = new PannerNode(audioContext, {
panningModel: "HRTF", panningModel: "HRTF",