正在显示
1 个修改的文件
包含
12 行增加
和
0 行删除
| @@ -254,6 +254,7 @@ internal constructor( | @@ -254,6 +254,7 @@ internal constructor( | ||
| 254 | options = options, | 254 | options = options, |
| 255 | requestConfig = { | 255 | requestConfig = { |
| 256 | disableDtx = !options.dtx | 256 | disableDtx = !options.dtx |
| 257 | + disableRed = !options.red | ||
| 257 | source = LivekitModels.TrackSource.MICROPHONE | 258 | source = LivekitModels.TrackSource.MICROPHONE |
| 258 | }, | 259 | }, |
| 259 | encodings = encodings, | 260 | encodings = encodings, |
| @@ -739,18 +740,29 @@ data class VideoTrackPublishOptions( | @@ -739,18 +740,29 @@ data class VideoTrackPublishOptions( | ||
| 739 | 740 | ||
| 740 | abstract class BaseAudioTrackPublishOptions { | 741 | abstract class BaseAudioTrackPublishOptions { |
| 741 | abstract val audioBitrate: Int? | 742 | abstract val audioBitrate: Int? |
| 743 | + | ||
| 744 | + /** | ||
| 745 | + * dtx (Discontinuous Transmission of audio), enabled by default for mono tracks. | ||
| 746 | + */ | ||
| 742 | abstract val dtx: Boolean | 747 | abstract val dtx: Boolean |
| 748 | + | ||
| 749 | + /** | ||
| 750 | + * red (Redundant Audio Data), enabled by default for mono tracks. | ||
| 751 | + */ | ||
| 752 | + abstract val red: Boolean | ||
| 743 | } | 753 | } |
| 744 | 754 | ||
| 745 | data class AudioTrackPublishDefaults( | 755 | data class AudioTrackPublishDefaults( |
| 746 | override val audioBitrate: Int? = 20_000, | 756 | override val audioBitrate: Int? = 20_000, |
| 747 | override val dtx: Boolean = true, | 757 | override val dtx: Boolean = true, |
| 758 | + override val red: Boolean = true, | ||
| 748 | ) : BaseAudioTrackPublishOptions() | 759 | ) : BaseAudioTrackPublishOptions() |
| 749 | 760 | ||
| 750 | data class AudioTrackPublishOptions( | 761 | data class AudioTrackPublishOptions( |
| 751 | override val name: String? = null, | 762 | override val name: String? = null, |
| 752 | override val audioBitrate: Int? = null, | 763 | override val audioBitrate: Int? = null, |
| 753 | override val dtx: Boolean = true, | 764 | override val dtx: Boolean = true, |
| 765 | + override val red: Boolean = true, | ||
| 754 | ) : BaseAudioTrackPublishOptions(), TrackPublishOptions { | 766 | ) : BaseAudioTrackPublishOptions(), TrackPublishOptions { |
| 755 | constructor( | 767 | constructor( |
| 756 | name: String? = null, | 768 | name: String? = null, |
-
请 注册 或 登录 后发表评论