File tree Expand file tree Collapse file tree 5 files changed +12
-0
lines changed
Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ message TrackPublishOptions {
261261 optional bool simulcast = 6 ;
262262 optional TrackSource source = 7 ;
263263 optional string stream = 8 ;
264+ optional bool preconnect_buffer = 9 ;
264265}
265266
266267enum IceTransportType {
Original file line number Diff line number Diff line change @@ -232,6 +232,9 @@ impl From<proto::TrackPublishOptions> for TrackPublishOptions {
232232 red : opts. red . unwrap_or ( default_publish_options. red ) ,
233233 simulcast : opts. simulcast . unwrap_or ( default_publish_options. simulcast ) ,
234234 stream : opts. stream . unwrap_or ( default_publish_options. stream ) ,
235+ preconnect_buffer : opts
236+ . preconnect_buffer
237+ . unwrap_or ( default_publish_options. preconnect_buffer ) ,
235238 }
236239 }
237240}
Original file line number Diff line number Diff line change @@ -3256,6 +3256,8 @@ pub struct TrackPublishOptions {
32563256 pub source : :: core:: option:: Option < i32 > ,
32573257 #[ prost( string, optional, tag="8" ) ]
32583258 pub stream : :: core:: option:: Option < :: prost:: alloc:: string:: String > ,
3259+ #[ prost( bool , optional, tag="9" ) ]
3260+ pub preconnect_buffer : :: core:: option:: Option < bool > ,
32593261}
32603262#[ allow( clippy:: derive_partial_eq_without_eq) ]
32613263#[ derive( Clone , PartialEq , :: prost:: Message ) ]
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ pub struct TrackPublishOptions {
8585 // pub name: String,
8686 pub source : TrackSource ,
8787 pub stream : String ,
88+ pub preconnect_buffer : bool ,
8889}
8990
9091impl Default for TrackPublishOptions {
@@ -98,6 +99,7 @@ impl Default for TrackPublishOptions {
9899 simulcast : true ,
99100 source : TrackSource :: Unknown ,
100101 stream : "" . to_string ( ) ,
102+ preconnect_buffer : false ,
101103 }
102104 }
103105}
Original file line number Diff line number Diff line change @@ -245,6 +245,10 @@ impl LocalParticipant {
245245 ..Default :: default ( )
246246 } ;
247247
248+ if options. preconnect_buffer {
249+ req. audio_features . push ( proto:: AudioTrackFeature :: TfPreconnectBuffer as i32 ) ;
250+ }
251+
248252 let mut encodings = Vec :: default ( ) ;
249253 match & track {
250254 LocalTrack :: Video ( video_track) => {
You can’t perform that action at this time.
0 commit comments