From b426308fa80ae59eacde96955296cf34cc7d70a7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 21 Dec 2022 18:24:44 +0000 Subject: [PATCH 1/8] Simulcast support --- src/video-grid/VideoTileContainer.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video-grid/VideoTileContainer.tsx b/src/video-grid/VideoTileContainer.tsx index 10f65c72..2e81386e 100644 --- a/src/video-grid/VideoTileContainer.tsx +++ b/src/video-grid/VideoTileContainer.tsx @@ -16,7 +16,7 @@ limitations under the License. import { SDPStreamMetadataPurpose } from "matrix-js-sdk/src/webrtc/callEventTypes"; import React from "react"; -import { useCallback } from "react"; +import { useCallback, useEffect } from "react"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { useCallFeed } from "./useCallFeed"; @@ -94,6 +94,10 @@ export function VideoTileContainer({ // Firefox doesn't respect the disablePictureInPicture attribute // https://bugzilla.mozilla.org/show_bug.cgi?id=1611831 + useEffect(() => { + item.callFeed?.setResolution(width, height); + }, [width, height, item]); + return ( <> Date: Wed, 21 Dec 2022 18:29:48 +0000 Subject: [PATCH 2/8] Use simulcast js-sdk branch --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f3ea45fd..c0da56fb 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "i18next": "^21.10.0", "i18next-browser-languagedetector": "^6.1.8", "i18next-http-backend": "^1.4.4", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#3651dce94bc249b05a3c25fd89b199255d821534", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#e4cc17feb5350d2e01df62110f139508cd8ac6ad", "matrix-widget-api": "^1.0.0", "mermaid": "^8.13.8", "normalize.css": "^8.0.1", diff --git a/yarn.lock b/yarn.lock index 9d14f2df..d2323e74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10271,9 +10271,9 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#3651dce94bc249b05a3c25fd89b199255d821534": - version "23.0.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/3651dce94bc249b05a3c25fd89b199255d821534" +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#e4cc17feb5350d2e01df62110f139508cd8ac6ad": + version "22.0.0" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e4cc17feb5350d2e01df62110f139508cd8ac6ad" dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.2" From 9150365704adb4d04c92c35454358fe1459c0945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 7 Jan 2023 09:40:57 +0100 Subject: [PATCH 3/8] Update js-sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- package.json | 2 +- yarn.lock | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 4e980413..d93c5244 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "i18next": "^21.10.0", "i18next-browser-languagedetector": "^6.1.8", "i18next-http-backend": "^1.4.4", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#e4cc17feb5350d2e01df62110f139508cd8ac6ad", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#61c1881193c3225166d8c2f4a56b8a009d577d49", "matrix-widget-api": "^1.0.0", "mermaid": "^8.13.8", "normalize.css": "^8.0.1", diff --git a/yarn.lock b/yarn.lock index 20e85668..b38924c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1830,10 +1830,6 @@ version "3.2.14" resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz#acd96c00a881d0f462e1f97a56c73742c8dbc984" -"@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz": - version "3.2.8" - resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz#8d53636d045e1776e2a2ec6613e57330dd9ce856" - "@mdx-js/mdx@^1.6.22": version "1.6.22" resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.6.22.tgz#8a723157bf90e78f17dc0f27995398e6c731f1ba" @@ -10275,9 +10271,9 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#e4cc17feb5350d2e01df62110f139508cd8ac6ad": - version "22.0.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e4cc17feb5350d2e01df62110f139508cd8ac6ad" +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#61c1881193c3225166d8c2f4a56b8a009d577d49": + version "23.0.0" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/61c1881193c3225166d8c2f4a56b8a009d577d49" dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.2" From 72a02b1b01ff19e8df782b5ee34b308c0534f51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 10 Jan 2023 21:00:30 +0100 Subject: [PATCH 4/8] Add proper (un)subscribe logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/room/InCallView.tsx | 2 +- src/video-grid/VideoTileContainer.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 232d001d..2d71577e 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -217,7 +217,7 @@ export function InCallView({ // shouldn't bother showing it if (connectionState !== undefined) { tileDescriptors.push({ - id: screenshareFeed.stream.id, + id: screenshareFeed.feedId, member, callFeed: screenshareFeed, focused: true, diff --git a/src/video-grid/VideoTileContainer.tsx b/src/video-grid/VideoTileContainer.tsx index c6fd9f08..3912a913 100644 --- a/src/video-grid/VideoTileContainer.tsx +++ b/src/video-grid/VideoTileContainer.tsx @@ -96,7 +96,11 @@ export function VideoTileContainer({ useEffect(() => { item.callFeed?.setResolution(width, height); - }, [width, height, item]); + }, [width, height, item.callFeed]); + + useEffect(() => { + item.callFeed?.setIsVisible(true); + }, [item.callFeed]); return ( <> From 8f1a65e856bf5aa2788b326059f08c94d1526999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 10 Jan 2023 22:02:43 +0100 Subject: [PATCH 5/8] Update js-sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d93c5244..6c51ef2e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "i18next": "^21.10.0", "i18next-browser-languagedetector": "^6.1.8", "i18next-http-backend": "^1.4.4", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#61c1881193c3225166d8c2f4a56b8a009d577d49", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#76075e050f859d668218dcb6f8a2e6940f23fa4e", "matrix-widget-api": "^1.0.0", "mermaid": "^8.13.8", "normalize.css": "^8.0.1", diff --git a/yarn.lock b/yarn.lock index fb8f1a84..eca05588 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10362,9 +10362,9 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#61c1881193c3225166d8c2f4a56b8a009d577d49": +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#76075e050f859d668218dcb6f8a2e6940f23fa4e": version "23.0.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/61c1881193c3225166d8c2f4a56b8a009d577d49" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/76075e050f859d668218dcb6f8a2e6940f23fa4e" dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.2" From e92b8f24e919f72db82ef87e48d83e945e3abf15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 11 Jan 2023 18:23:34 +0100 Subject: [PATCH 6/8] Update js-sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c51ef2e..a91f0fbd 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "i18next": "^21.10.0", "i18next-browser-languagedetector": "^6.1.8", "i18next-http-backend": "^1.4.4", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#76075e050f859d668218dcb6f8a2e6940f23fa4e", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#77ae9947984fb9f1c1bee9f28e6dfda75539e739", "matrix-widget-api": "^1.0.0", "mermaid": "^8.13.8", "normalize.css": "^8.0.1", From 8284d0da60aea972209219d5082ac81f57a549bf Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 16 Jan 2023 18:10:50 +0000 Subject: [PATCH 7/8] Don't crash if no stream on callfeed --- src/video-grid/useCallFeed.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video-grid/useCallFeed.ts b/src/video-grid/useCallFeed.ts index 35bf8e58..e29bfac4 100644 --- a/src/video-grid/useCallFeed.ts +++ b/src/video-grid/useCallFeed.ts @@ -39,7 +39,10 @@ function getCallFeedState(callFeed: CallFeed | undefined): CallFeedState { videoMuted: callFeed ? callFeed.isVideoMuted() : true, audioMuted: callFeed ? callFeed.isAudioMuted() : true, localVolume: callFeed ? callFeed.getLocalVolume() : 0, - hasAudio: callFeed ? callFeed.stream.getAudioTracks().length >= 1 : false, + hasAudio: + callFeed && callFeed.stream + ? callFeed.stream.getAudioTracks().length >= 1 + : false, disposed: callFeed ? callFeed.disposed : undefined, stream: callFeed ? callFeed.stream : undefined, purpose: callFeed ? callFeed.purpose : undefined, From 003e9206dfbe8ffefcbc66696bd03a6036064c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 23 Jan 2023 21:13:44 +0100 Subject: [PATCH 8/8] Update js-sdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- package.json | 2 +- yarn.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c02da7dc..df74b20e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "i18next": "^21.10.0", "i18next-browser-languagedetector": "^6.1.8", "i18next-http-backend": "^1.4.4", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#e1a14812fd9f0a261b0e823e3cc68d9ee93b8f11", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#278dd6a3d35cf89c03f9172f9c81579577a267b3", "matrix-widget-api": "^1.0.0", "mermaid": "^8.13.8", "normalize.css": "^8.0.1", diff --git a/yarn.lock b/yarn.lock index 9723296d..423861a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10362,9 +10362,9 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#e1a14812fd9f0a261b0e823e3cc68d9ee93b8f11": +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#278dd6a3d35cf89c03f9172f9c81579577a267b3": version "23.0.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e1a14812fd9f0a261b0e823e3cc68d9ee93b8f11" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/278dd6a3d35cf89c03f9172f9c81579577a267b3" dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.2"