-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb766be
commit 7fc81f8
Showing
3 changed files
with
16 additions
and
17 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
lib/services/webrtc/helpers/extensions/sdp_extensions.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
extension SdpX on String { | ||
String removeRTCPMux() { | ||
return replaceAll(RegExp(r'a=rtcp-mux.*\r\n'), ''); | ||
} | ||
|
||
String enableAudioDTX() { | ||
return replaceAll( | ||
'a=fmtp:111 minptime=10;useinbandfec=1', | ||
'a=fmtp:111 minptime=10;useinbandfec=1;usedtx=1', | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1 @@ | ||
class WebRTCUtils { | ||
static String removeRTCPMux(String sdp) { | ||
sdp = sdp.replaceAll(RegExp(r'a=rtcp-mux.*\r\n'), ''); | ||
|
||
return sdp; | ||
} | ||
|
||
static String enableAudioDTX({required String sdp}) { | ||
sdp = sdp.replaceAll( | ||
'a=fmtp:111 minptime=10;useinbandfec=1', | ||
'a=fmtp:111 minptime=10;useinbandfec=1;usedtx=1', | ||
); | ||
return sdp; | ||
} | ||
} | ||
class WebRTCUtils {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters