diff --git a/package.json b/package.json index 00b61e3..cf17c3c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "classnames": "^2.3.1", "color-hash": "^2.0.1", "events": "^3.3.0", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#9a15094374f52053ca9f833269d2b1c6c7f964d2", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#984dd26a138411ef73903ff4e635f2752e0829f2", "mermaid": "^8.13.8", "normalize.css": "^8.0.1", "pako": "^2.0.4", diff --git a/src/room/usePTT.ts b/src/room/usePTT.ts index 096e662..847a1aa 100644 --- a/src/room/usePTT.ts +++ b/src/room/usePTT.ts @@ -130,7 +130,7 @@ export const usePTT = ( const onMuteStateChanged = useCallback(() => { const activeSpeakerFeed = getActiveSpeakerFeed(userMediaFeeds, groupCall); - let blocked = false; + let blocked = transmitBlocked; if (activeSpeakerUserId === null && activeSpeakerFeed !== null) { if (activeSpeakerFeed.userId === client.getUserId()) { playClip(PTTClipID.START_TALKING_LOCAL); @@ -141,8 +141,8 @@ export const usePTT = ( playClip(PTTClipID.END_TALKING); } else if ( pttButtonHeld && - activeSpeakerUserId === client.getUserId() && - activeSpeakerFeed?.userId !== client.getUserId() + activeSpeakerFeed?.userId !== client.getUserId() && + !transmitBlocked ) { // We were talking but we've been cut off: mute our own mic // (this is the easier way of cutting other speakers off if an @@ -167,6 +167,7 @@ export const usePTT = ( client, userMediaFeeds, setMicMuteWrapper, + transmitBlocked, ]); useEffect(() => { diff --git a/yarn.lock b/yarn.lock index 3c8d21e..5595149 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8652,9 +8652,9 @@ matrix-events-sdk@^0.0.1-beta.7: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1-beta.7.tgz#5ffe45eba1f67cc8d7c2377736c728b322524934" integrity sha512-9jl4wtWanUFSy2sr2lCjErN/oC8KTAtaeaozJtrgot1JiQcEI4Rda9OLgQ7nLKaqb4Z/QUx/fR3XpDzm5Jy1JA== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#9a15094374f52053ca9f833269d2b1c6c7f964d2": +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#984dd26a138411ef73903ff4e635f2752e0829f2": version "18.1.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/9a15094374f52053ca9f833269d2b1c6c7f964d2" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/984dd26a138411ef73903ff4e635f2752e0829f2" dependencies: "@babel/runtime" "^7.12.5" "@types/sdp-transform" "^2.4.5"