Skip to content

Commit

Permalink
Merge pull request #6 from abhay-s-rawat/main
Browse files Browse the repository at this point in the history
Added few variables and callbacks
  • Loading branch information
cloudwebrtc authored Jun 3, 2022
2 parents cf9eb97 + b41e426 commit ea624dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 5 additions & 0 deletions lib/src/rtc_data_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<RTCDataChannelState> stateChangeStream;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit ea624dd

Please sign in to comment.