8000 BREAKING CHANGES - Remove unused RTC_Configuration classes · next-coder/flutter-webrtc@73db858 · GitHub
[go: up one dir, main page]

Skip to content

Commit 73db858

Browse files
committed
BREAKING CHANGES - Remove unused RTC_Configuration classes
1 parent 943af48 commit 73db858

File tree

3 files changed

+65
-64
lines changed

3 files changed

+65
-64
lines changed

lib/src/interface/mediadevices.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ abstract class MediaDevices {
120120
/// cameras, headsets, and so forth.
121121
class MediaDeviceInfo {
122122
MediaDeviceInfo({
123-
this.kind,
124-
this.label,
125-
this.groupId,
126-
this.deviceId,
123+
required this.kind,
124+
required this.label,
125+
required this.groupId,
126+
required this.deviceId,
127127
});
128128

129129
/// Returns a String that is an identifier for the represented device that
Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
abstract class RTCOfferOptions {
2-
RTCOfferOptions({
3-
bool iceRestart,
4-
bool offerToReceiveAudio,
5-
bool offerToReceiveVideo,
6-
bool voiceActivityDetection,
7-
});
8-
bool get iceRestart;
9-
bool get offerToReceiveAudio;
10-
bool get offerToReceiveVideo;
11-
bool get voiceActivityDetection;
12-
}
13-
14-
abstract class RTCAnswerOptions {
15-
RTCAnswerOptions({bool voiceActivityDetection});
16-
bool get voiceActivityDetection;
17-
}
18-
19-
abstract class RTCConfiguration {
20-
RTCConfiguration({
21-
List<RTCIceServer> iceServers,
22-
String rtcpMuxPolicy,
23-
String iceTransportPolicy,
24-
String bundlePolicy,
25-
String peerIdentity,
26-
int iceCandidatePoolSize,
27-
});
28-
List<RTCIceServer> get iceServers;
29-
30-
///Optional: 'negotiate' or 'require'
31-
String get rtcpMuxPolicy;
32-
33-
///Optional: 'relay' or 'all'
34-
String get iceTransportPolicy;
35-
36-
/// A DOMString which specifies the target peer identity for the
37-
/// RTCPeerConnection. If this value is set (it defaults to null),
38-
/// the RTCPeerConnection will not connect to a remote peer unless
39-
/// it can successfully authenticate with the given name.
40-
String get peerIdentity;
41-
42-
int get iceCandidatePoolSize;
43-
44-
///Optional: 'balanced' | 'max-compat' | 'max-bundle'
45-
String get bundlePolicy;
46-
}
47-
48-
abstract class RTCIceServer {
49-
RTCIceServer({String urls, String username, String credential});
50-
// String or List<String>
51-
dynamic get urls;
52-
String get username;
53-
String get credential;
54-
}
1+
// abstract class RTCOfferOptions {
2+
// RTCOfferOptions({
3+
// bool iceRestart,
4+
// bool offerToReceiveAudio,
5+
// bool offerToReceiveVideo,
6+
// bool voiceActivityDetection,
7+
// });
8+
// bool get iceRestart;
9+
// bool get offerToReceiveAudio;
10+
// bool get offerToReceiveVideo;
11+
// bool get voiceActivityDetection;
12+
// }
13+
14+
// abstract class RTCAnswerOptions {
15+
// RTCAnswerOptions({bool voiceActivityDetection});
16+
// bool get voiceActivityDetection;
17+
// }
18+
19+
// abstract class RTCConfiguration {
20+
// RTCConfiguration({
21+
// List<RTCIceServer> iceServers,
22+
// String rtcpMuxPolicy,
23+
// String iceTransportPolicy,
24+
// String bundlePolicy,
25+
// String peerIdentity,
26+
// int iceCandidatePoolSize,
27+
// });
28+
// List<RTCIceServer> get iceServers;
29+
30+
// ///Optional: 'negotiate' or 'require'
31+
// String get rtcpMuxPolicy;
32+
33+
// ///Optional: 'relay' or 'all'
34+
// String get iceTransportPolicy;
35+
36+
// /// A DOMString which specifies the target peer identity for the
37+
// /// RTCPeerConnection. If this value is set (it defaults to null),
38+
// /// the RTCPeerConnection will not connect to a remote peer unless
39+
// /// it can successfully authenticate with the given name.
40+
// String get peerIdentity;
41+
42+
// int get iceCandidatePoolSize;
43+
44+
// ///Optional: 'balanced' | 'max-compat' | 'max-bundle'
45+
// String get bundlePolicy;
46+
// }
47+
48+
// abstract class RTCIceServer {
49+
// RTCIceServer({String urls, String username, String credential});
50+
// // String or List<String>
51+
// dynamic get urls;
52+
// String get username;
53+
// String get credential;
54+
// }

lib/src/interface/rtc_data_channel.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ class RTCDataChannelMessage {
4040
_data = binary;
4141
_isBinary = true;
4242
}
43-
dynamic _data;
44-
bool _isBinary;
43+
44+
late dynamic _data;
45+
late bool _isBinary;
4546

4647
/// Tells whether this message contains binary.
4748
/// If this is false, it's a text message.
@@ -68,19 +69,19 @@ typedef RTCDataChannelOnMessageCallback = void Function(
6869
abstract class RTCDataChannel {
6970
RTCDataChannel();
7071

71-
RTCDataChannelStateCallback onDataChannelState;
72-
RTCDataChannelOnMessageCallback onMessage;
72+
RTCDataChannelStateCallback? onDataChannelState;
73+
RTCDataChannelOnMessageCallback? onMessage;
7374

7475
/// Get current state.
7576
RTCDataChannelState get state;
7677

7778
/// Stream of state change events. Emits the new state on change.
7879
/// Closes when the [RTCDataChannel] is closed.
79-
Stream<RTCDataChannelState> stateChangeStream;
80+
late Stream<RTCDataChannelState> stateChangeStream;
8081

8182
/// Stream of incoming messages. Emits the message.
8283
/// Closes when the [RTCDataChannel] is closed.
83-
Stream<RTCDataChannelMessage> messageStream;
84+
late Stream<RTCDataChannelMessage> messageStream;
8485

8586
/// Send a message to this datachannel.
8687
/// To send a text message, use the default constructor to instantiate a text [RTCDataChannelMessage]

0 commit comments

Comments
 (0)
0