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,
audioContext,
audioDestination,
isLocal,
isLocal || audioMuted,
localVolume
);
const {

View file

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