Skip to content

Commit 0d919c6

Browse files
authored
Use legacy SVC encoding specification for React-Native (#1093)
* test rn * fix * changeset
1 parent cf781d8 commit 0d919c6

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.changeset/chilly-grapes-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"livekit-client": patch
3+
---
4+
5+
Use legacy SVC encoding specification for React-Native

example/sample.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const appActions = {
9999
red: true,
100100
forceStereo: false,
101101
screenShareEncoding: ScreenSharePresets.h1080fps30.encoding,
102+
scalabilityMode: 'L3T3',
102103
},
103104
videoCaptureDefaults: {
104105
resolution: VideoPresets.h720.resolution,

src/room/participant/publishUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ export function computeVideoEncodings(
149149
const browser = getBrowser();
150150
if (
151151
isSafari() ||
152+
// Even tho RN runs M114, it does not produce SVC layers when a single encoding
153+
// is provided. So we'll use the legacy SVC specification for now.
154+
// TODO: when we upstream libwebrtc, this will need additional verification
155+
isReactNative() ||
152156
(browser?.name === 'Chrome' && compareVersions(browser?.version, '113') < 0)
153157
) {
154158
const bitratesRatio = sm.suffix == 'h' ? 2 : 3;

0 commit comments

Comments
 (0)