mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Make reset on network change the default.
PiperOrigin-RevId: 262886490
This commit is contained in:
parent
8967dd9c4c
commit
e5fcee40e5
@ -31,6 +31,7 @@
|
||||
`DefaultTrackSelector` to allow adaptive selections of audio tracks with
|
||||
different channel counts
|
||||
([#6257](https://github.com/google/ExoPlayer/issues/6257)).
|
||||
* Reset `DefaultBandwidthMeter` to initial values on network change.
|
||||
|
||||
### 2.10.4 ###
|
||||
|
||||
|
@ -100,6 +100,7 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList
|
||||
initialBitrateEstimates = getInitialBitrateEstimatesForCountry(Util.getCountryCode(context));
|
||||
slidingWindowMaxWeight = DEFAULT_SLIDING_WINDOW_MAX_WEIGHT;
|
||||
clock = Clock.DEFAULT;
|
||||
resetOnNetworkTypeChange = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -168,14 +169,12 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether to reset if the network type changes.
|
||||
*
|
||||
* <p>This method is experimental, and will be renamed or removed in a future release.
|
||||
* Sets whether to reset if the network type changes. The default value is {@code true}.
|
||||
*
|
||||
* @param resetOnNetworkTypeChange Whether to reset if the network type changes.
|
||||
* @return This builder.
|
||||
*/
|
||||
public Builder experimental_resetOnNetworkTypeChange(boolean resetOnNetworkTypeChange) {
|
||||
public Builder setResetOnNetworkTypeChange(boolean resetOnNetworkTypeChange) {
|
||||
this.resetOnNetworkTypeChange = resetOnNetworkTypeChange;
|
||||
return this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user