Merge pull request #482 from vector-im/dbkr/fix_screenshare_crash
Fix crash on screen share
This commit is contained in:
commit
810cdeeab4
1 changed files with 6 additions and 1 deletions
|
@ -202,7 +202,12 @@ export const useSpatialMediaStream = (
|
||||||
const sourceRef = useRef<MediaStreamAudioSourceNode>();
|
const sourceRef = useRef<MediaStreamAudioSourceNode>();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (spatialAudio && tileRef.current && !mute) {
|
if (
|
||||||
|
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…
Add table
Reference in a new issue