Skip to content

Commit b41e426

Browse files
committed
Added onBufferedAmountLow callback and bufferedAmountLowThreshold variable
1 parent f33349c commit b41e426

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
--------------------------------------------
44
[1.0.5] - 2022-05-31
55

6-
* Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback and set bufferedAmount as non nullable.
6+
* Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback (bufferedAmount should be set to non nullable after bufferedAmount implementation on all platforms).
7+
* Added Function(int currentAmount)? onBufferedAmountLow callback and bufferedAmountLowThreshold variable.
78

89
[1.0.4] - 2022-05-08
910

lib/src/rtc_data_channel.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ abstract class RTCDataChannel {
6767
Function(RTCDataChannelState state)? onDataChannelState;
6868
Function(RTCDataChannelMessage data)? onMessage;
6969
Function(int currentAmount, int changedAmount)? onBufferedAmountChange;
70+
Function(int currentAmount)? onBufferedAmountLow;
7071

7172
/// Get current state.
7273
RTCDataChannelState? get state;
@@ -77,7 +78,10 @@ abstract class RTCDataChannel {
7778
/// Get channel label
7879
String? get label;
7980

80-
int get bufferedAmount;
81+
int? get bufferedAmount;
82+
83+
/// Set threshold to trigger onBufferedAmountLow callback
84+
int? bufferedAmountLowThreshold;
8185

8286
/// Stream of state change events. Emits the new state on change.
8387
/// Closes when the [RTCDataChannel] is closed.

0 commit comments

Comments
 (0)