Skip to content

Commit

Permalink
Use legacy SVC encoding specification for React-Native (#1093)
Browse files Browse the repository at this point in the history
* test rn

* fix

* changeset
  • Loading branch information
davidzhao authored May 31, 2024
1 parent cf781d8 commit 0d919c6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-grapes-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Use legacy SVC encoding specification for React-Native
1 change: 1 addition & 0 deletions example/sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const appActions = {
red: true,
forceStereo: false,
screenShareEncoding: ScreenSharePresets.h1080fps30.encoding,
scalabilityMode: 'L3T3',
},
videoCaptureDefaults: {
resolution: VideoPresets.h720.resolution,
Expand Down
4 changes: 4 additions & 0 deletions src/room/participant/publishUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export function computeVideoEncodings(
const browser = getBrowser();
if (
isSafari() ||
// Even tho RN runs M114, it does not produce SVC layers when a single encoding
// is provided. So we'll use the legacy SVC specification for now.
// TODO: when we upstream libwebrtc, this will need additional verification
isReactNative() ||
(browser?.name === 'Chrome' && compareVersions(browser?.version, '113') < 0)
) {
const bitratesRatio = sm.suffix == 'h' ? 2 : 3;
Expand Down

0 comments on commit 0d919c6

Please sign in to comment.