Commit 7803f2c
authored
fix: missing adaptive floating dimensions for landscape video (#1983)
### 💡 Overview
Follow up to #1969
The current algorithm only handles portrait local video on floating
view. Which is default on mobile.
But we can change it to landscape video from web for example.
Landscape video needs more width. And this PR fixes it. Again, based on
Android AOSP algorithm here.
Additionally, we use screen dimensions to compute the base dimensions
now. Because, say if integrator wants to constrain the CallContent to
small view, the floating dimensions can become extremely small. Using
screen dimensions make it independent of that. This is consistent with
Android PiP mode also.
| Portrait video | Landscape video |
| ------------- | ------------- |
| <img width="1080" height="2400" alt="Screenshot_20251106-114806"
src="https://github.com/user-attachments/assets/fbe5845d-d962-4f95-9609-a9da3856413e"
/> | <img width="1080" height="2400" alt="Screenshot_20251106-114758"
src="https://github.com/user-attachments/assets/5ee4143f-f29d-4031-9ae5-b5ae4559fbf2"
/> |
Ticket: https://linear.app/stream/issue/RN-3021 parent f8e5c6e commit 7803f2c
File tree
2 files changed
+27
-19
lines changed- packages/react-native-sdk/src/components/Participant/FloatingParticipantView
2 files changed
+27
-19
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
| |||
Lines changed: 27 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 9 | | |
15 | 10 | | |
16 | 11 | | |
17 | | - | |
| 12 | + | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | | - | |
26 | 25 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
31 | 29 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
0 commit comments