Skip to content

Added few variables and callbacks #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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