mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Fix crash on screen share
Don't try to wire up audio nodes if the stream has no audio track, 'cos it'll crash. Fixes https://github.com/vector-im/element-call/issues/421
This commit is contained in:
parent
6d7f52d2d6
commit
56afbe6eb1
@ -202,7 +202,12 @@ export const useSpatialMediaStream = (
|
||||
const sourceRef = useRef<MediaStreamAudioSourceNode>();
|
||||
|
||||
useEffect(() => {
|
||||
if (spatialAudio && tileRef.current && !mute) {
|
||||
if (
|
||||
spatialAudio &&
|
||||
tileRef.current &&
|
||||
!mute &&
|
||||
stream.getAudioTracks().length > 0
|
||||
) {
|
||||
if (!pannerNodeRef.current) {
|
||||
pannerNodeRef.current = new PannerNode(audioContext, {
|
||||
panningModel: "HRTF",
|
||||
|
Loading…
Reference in New Issue
Block a user