Skip to content

Commit 3bdfe9f

Browse files
committed
changes.
1 parent 8532227 commit 3bdfe9f

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patch type="fixed" "Maintain video quality for live streaming via new liveStreaming capture option"

lib/src/participant/local.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,16 +594,16 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
594594
}
595595

596596
DegradationPreference getDefaultDegradationPreference(LocalVideoTrack track) {
597+
// live streaming: keep both framerate and resolution, accept higher bitrate cost
598+
if (track.currentOptions.liveStreaming == true) {
599+
return DegradationPreference.maintainFramerateAndResolution;
600+
}
597601
// a few of reasons we have different default paths:
598602
// 1. without this, Chrome seems to aggressively resize the SVC video stating `quality-limitation: bandwidth` even when BW isn't an issue
599603
// 2. since we are overriding contentHint to motion (to workaround L1T3 publishing), it overrides the default degradationPreference to `balanced`
600604
final VideoDimensions dimensions = track.currentOptions.params.dimensions;
601-
if (track.source == TrackSource.screenShareVideo ||
602-
dimensions.height >= 720 ||
603-
track.currentOptions.liveStreaming == true) {
604-
return track.currentOptions.liveStreaming == true
605-
? DegradationPreference.maintainFramerateAndResolution
606-
: DegradationPreference.maintainResolution;
605+
if (track.source == TrackSource.screenShareVideo || dimensions.height >= 720) {
606+
return DegradationPreference.maintainResolution;
607607
}
608608
return DegradationPreference.balanced;
609609
}

0 commit comments

Comments
 (0)