Skip to content

Commit ea624dd

Browse files
authored
Merge pull request #6 from abhay-s-rawat/main
Added few variables and callbacks
2 parents cf9eb97 + b41e426 commit ea624dd

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22

33
--------------------------------------------
4+
[1.0.5] - 2022-05-31
5+
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.
8+
49
[1.0.4] - 2022-05-08
510

611
* Change to nullable track for replaceTrack/setTrack.

lib/src/rtc_data_channel.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ abstract class RTCDataChannel {
6666

6767
Function(RTCDataChannelState state)? onDataChannelState;
6868
Function(RTCDataChannelMessage data)? onMessage;
69+
Function(int currentAmount, int changedAmount)? onBufferedAmountChange;
70+
Function(int currentAmount)? onBufferedAmountLow;
6971

7072
/// Get current state.
7173
RTCDataChannelState? get state;
@@ -78,6 +80,9 @@ abstract class RTCDataChannel {
7880

7981
int? get bufferedAmount;
8082

83+
/// Set threshold to trigger onBufferedAmountLow callback
84+
int? bufferedAmountLowThreshold;
85+
8186
/// Stream of state change events. Emits the new state on change.
8287
/// Closes when the [RTCDataChannel] is closed.
8388
late Stream<RTCDataChannelState> stateChangeStream;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: webrtc_interface
22
description: WebRTC Interface for Dart-Web/Flutter.
3-
version: 1.0.4
3+
version: 1.0.5
44
homepage: https://flutter-webrtc.org
55

66
environment:

0 commit comments

Comments
 (0)