Commit 9985e32
committed
🛠️ fix: handle null cameraSource in Recorder component
Changes:
- added null check for cameraSource before accessing deviceId
- added localCameraStream variable to store camera stream if cameraSource is not null
- updated MediaRecorder construction to use localCameraStream instead of cameraStream
- updated conditions for setting screenMedia and starting screenRecorder
This update fixes issues with cameraSource being null, and handles it accordingly by setting cameraStream to null and not creating a MediaRecorder for it. It also updates the conditions for setting screenMedia and starting screenRecorder to account for the case where cameraSource is null or localCameraStream is null.1 parent e66dfdc commit 9985e32
1 file changed
Lines changed: 26 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
246 | 247 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
259 | 265 | | |
260 | 266 | | |
261 | 267 | | |
| |||
274 | 280 | | |
275 | 281 | | |
276 | 282 | | |
277 | | - | |
278 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
279 | 289 | | |
280 | 290 | | |
281 | 291 | | |
| |||
308 | 318 | | |
309 | 319 | | |
310 | 320 | | |
311 | | - | |
| 321 | + | |
| 322 | + | |
312 | 323 | | |
313 | 324 | | |
314 | 325 | | |
| |||
0 commit comments