diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c19a2d..cf0fcef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog -------------------------------------------- +[1.0.5] - 2022-05-31 + +* Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback (bufferedAmount should be set to non nullable after bufferedAmount implementation on all platforms). +* Added Function(int currentAmount)? onBufferedAmountLow callback and bufferedAmountLowThreshold variable. + [1.0.4] - 2022-05-08 * Change to nullable track for replaceTrack/setTrack. diff --git a/lib/src/rtc_data_channel.dart b/lib/src/rtc_data_channel.dart index ffc4e39..de5692f 100644 --- a/lib/src/rtc_data_channel.dart +++ b/lib/src/rtc_data_channel.dart @@ -66,6 +66,8 @@ abstract class RTCDataChannel { Function(RTCDataChannelState state)? onDataChannelState; Function(RTCDataChannelMessage data)? onMessage; + Function(int currentAmount, int changedAmount)? onBufferedAmountChange; + Function(int currentAmount)? onBufferedAmountLow; /// Get current state. RTCDataChannelState? get state; @@ -78,6 +80,9 @@ abstract class RTCDataChannel { int? get bufferedAmount; + /// Set threshold to trigger onBufferedAmountLow callback + int? bufferedAmountLowThreshold; + /// Stream of state change events. Emits the new state on change. /// Closes when the [RTCDataChannel] is closed. late Stream stateChangeStream; diff --git a/pubspec.yaml b/pubspec.yaml index 101c8f2..491917e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: webrtc_interface description: WebRTC Interface for Dart-Web/Flutter. -version: 1.0.4 +version: 1.0.5 homepage: https://flutter-webrtc.org environment: