Merge pull request #455 from vector-im/dbkr/fix_talkover
Fix talking collision not colliding properly
This commit is contained in:
commit
b0c8ceb302
3 changed files with 7 additions and 6 deletions
|
@ -38,7 +38,7 @@
|
||||||
"classnames": "^2.3.1",
|
"classnames": "^2.3.1",
|
||||||
"color-hash": "^2.0.1",
|
"color-hash": "^2.0.1",
|
||||||
"events": "^3.3.0",
|
"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",
|
"mermaid": "^8.13.8",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"pako": "^2.0.4",
|
"pako": "^2.0.4",
|
||||||
|
|
|
@ -130,7 +130,7 @@ export const usePTT = (
|
||||||
const onMuteStateChanged = useCallback(() => {
|
const onMuteStateChanged = useCallback(() => {
|
||||||
const activeSpeakerFeed = getActiveSpeakerFeed(userMediaFeeds, groupCall);
|
const activeSpeakerFeed = getActiveSpeakerFeed(userMediaFeeds, groupCall);
|
||||||
|
|
||||||
let blocked = false;
|
let blocked = transmitBlocked;
|
||||||
if (activeSpeakerUserId === null && activeSpeakerFeed !== null) {
|
if (activeSpeakerUserId === null && activeSpeakerFeed !== null) {
|
||||||
if (activeSpeakerFeed.userId === client.getUserId()) {
|
if (activeSpeakerFeed.userId === client.getUserId()) {
|
||||||
playClip(PTTClipID.START_TALKING_LOCAL);
|
playClip(PTTClipID.START_TALKING_LOCAL);
|
||||||
|
@ -141,8 +141,8 @@ export const usePTT = (
|
||||||
playClip(PTTClipID.END_TALKING);
|
playClip(PTTClipID.END_TALKING);
|
||||||
} else if (
|
} else if (
|
||||||
pttButtonHeld &&
|
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
|
// 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
|
// (this is the easier way of cutting other speakers off if an
|
||||||
|
@ -167,6 +167,7 @@ export const usePTT = (
|
||||||
client,
|
client,
|
||||||
userMediaFeeds,
|
userMediaFeeds,
|
||||||
setMicMuteWrapper,
|
setMicMuteWrapper,
|
||||||
|
transmitBlocked,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -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"
|
resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1-beta.7.tgz#5ffe45eba1f67cc8d7c2377736c728b322524934"
|
||||||
integrity sha512-9jl4wtWanUFSy2sr2lCjErN/oC8KTAtaeaozJtrgot1JiQcEI4Rda9OLgQ7nLKaqb4Z/QUx/fR3XpDzm5Jy1JA==
|
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"
|
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:
|
dependencies:
|
||||||
"@babel/runtime" "^7.12.5"
|
"@babel/runtime" "^7.12.5"
|
||||||
"@types/sdp-transform" "^2.4.5"
|
"@types/sdp-transform" "^2.4.5"
|
||||||
|
|
Loading…
Add table
Reference in a new issue