Deprecated `withHighestBitrate()` in favour of `bestQuality`.
This commit is contained in:
parent
4dcea575bc
commit
48b8b503ac
|
@ -1,3 +1,6 @@
|
|||
## 1.10.10+1
|
||||
- Deprecated `withHighestBitrate()` in favour of `bestQuality`.
|
||||
|
||||
## 1.10.10
|
||||
- Fix issue #136: Add `bannerUrl` getter for `Channel`.
|
||||
- Fix `ChannelClient.getByUsername` for `youtube.com/c/XXXX` channels.
|
||||
|
|
|
@ -56,7 +56,8 @@ extension StreamInfoIterableExt<T extends StreamInfo> on Iterable<T> {
|
|||
e.bitrate,
|
||||
e.codec.parameters['codecs'],
|
||||
if (e is VideoStreamInfo) e.framerate,
|
||||
if (e is VideoStreamInfo) 'video only',
|
||||
if (e is VideoOnlyStreamInfo) 'video only',
|
||||
if (e is MuxedStreamInfo) 'muxed',
|
||||
e.size
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -32,8 +32,11 @@ extension VideoStreamInfoExtension<T extends VideoStreamInfo> on Iterable<T> {
|
|||
Set<String> getAllVideoQualitiesLabel() => map((e) => e.qualityLabel).toSet();
|
||||
|
||||
/// Gets the stream with best video quality.
|
||||
@Deprecated('This is actually a typo, and actually returns the videos sorted by the best *video quality*. Now use the `bestQuality` getter ')
|
||||
T withHighestBitrate() => sortByVideoQuality().last;
|
||||
|
||||
T get bestQuality => sortByVideoQuality().last;
|
||||
|
||||
/// Gets the video streams sorted by highest video quality
|
||||
/// (then by framerate) in ascending order.
|
||||
/// This returns new list without editing the original list.
|
||||
|
|
|
@ -21,7 +21,6 @@ void main() {
|
|||
expect(video.author, 'Tyrrrz');
|
||||
var rangeMs = DateTime(2017, 09, 30, 17, 15, 26).millisecondsSinceEpoch;
|
||||
// 1day margin since the uploadDate could differ from timezones
|
||||
// YouTube now doesn't send the upload date/ publish date anymore.
|
||||
expect(video.uploadDate!.millisecondsSinceEpoch,
|
||||
inInclusiveRange(rangeMs - 86400000, rangeMs + 86400000));
|
||||
expect(video.publishDate!.millisecondsSinceEpoch,
|
||||
|
|
Loading…
Reference in New Issue