From 6944b5ce43336d360496dc81853001216e8ae42d Mon Sep 17 00:00:00 2001 From: Abhay Date: Tue, 31 May 2022 23:34:57 +0530 Subject: [PATCH 1/5] Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback. --- lib/src/rtc_data_channel.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/rtc_data_channel.dart b/lib/src/rtc_data_channel.dart index ffc4e39..c3fcdd8 100644 --- a/lib/src/rtc_data_channel.dart +++ b/lib/src/rtc_data_channel.dart @@ -66,6 +66,7 @@ abstract class RTCDataChannel { Function(RTCDataChannelState state)? onDataChannelState; Function(RTCDataChannelMessage data)? onMessage; + Function(int currentAmount, int changedAmount)? onBufferedAmountChange; /// Get current state. RTCDataChannelState? get state; From 4f097ce99e0cda3c6cb6538b9e83a098b56126e3 Mon Sep 17 00:00:00 2001 From: Abhay Date: Tue, 31 May 2022 23:37:29 +0530 Subject: [PATCH 2/5] Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c19a2d..84fd9ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -------------------------------------------- +[1.0.5] - 2022-05-31 + +* Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback. + [1.0.4] - 2022-05-08 * Change to nullable track for replaceTrack/setTrack. From 5cec40dc78bdf8419864e4138ba5ddc52a4711a2 Mon Sep 17 00:00:00 2001 From: Abhay Date: Tue, 31 May 2022 23:42:54 +0530 Subject: [PATCH 3/5] Added callback onBufferedAmountChange --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From f33349c7b63cf598d6251261ea4ff0d5a82f45da Mon Sep 17 00:00:00 2001 From: Abhay Date: Tue, 31 May 2022 23:53:55 +0530 Subject: [PATCH 4/5] Added callback onBufferedAmountChange and bufferedAmount --- CHANGELOG.md | 2 +- lib/src/rtc_data_channel.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84fd9ef..962f001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ -------------------------------------------- [1.0.5] - 2022-05-31 -* Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback. +* Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback and set bufferedAmount as non nullable. [1.0.4] - 2022-05-08 diff --git a/lib/src/rtc_data_channel.dart b/lib/src/rtc_data_channel.dart index c3fcdd8..0199af6 100644 --- a/lib/src/rtc_data_channel.dart +++ b/lib/src/rtc_data_channel.dart @@ -77,7 +77,7 @@ abstract class RTCDataChannel { /// Get channel label String? get label; - int? get bufferedAmount; + int get bufferedAmount; /// Stream of state change events. Emits the new state on change. /// Closes when the [RTCDataChannel] is closed. From b41e4266e41b576a775bb65a562cf05331aca8eb Mon Sep 17 00:00:00 2001 From: Abhay Date: Thu, 2 Jun 2022 09:19:59 +0530 Subject: [PATCH 5/5] Added onBufferedAmountLow callback and bufferedAmountLowThreshold variable --- CHANGELOG.md | 3 ++- lib/src/rtc_data_channel.dart | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 962f001..cf0fcef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ -------------------------------------------- [1.0.5] - 2022-05-31 -* Added Function(int currentAmount, int changedAmount)? onBufferedAmountChange callback and set bufferedAmount as non nullable. +* 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 diff --git a/lib/src/rtc_data_channel.dart b/lib/src/rtc_data_channel.dart index 0199af6..de5692f 100644 --- a/lib/src/rtc_data_channel.dart +++ b/lib/src/rtc_data_channel.dart @@ -67,6 +67,7 @@ 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; @@ -77,7 +78,10 @@ abstract class RTCDataChannel { /// Get channel label String? get label; - int get bufferedAmount; + 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.