diff --git a/lib/src/videos/streams/muxed_stream_info.dart b/lib/src/videos/streams/muxed_stream_info.dart index 0929078..919e08f 100644 --- a/lib/src/videos/streams/muxed_stream_info.dart +++ b/lib/src/videos/streams/muxed_stream_info.dart @@ -1,4 +1,4 @@ -import 'package:http_parser/src/media_type.dart'; +import 'package:http_parser/http_parser.dart'; import '../../reverse_engineering/models/fragment.dart'; import 'audio_stream_info.dart'; @@ -71,7 +71,7 @@ class MuxedStreamInfo implements AudioStreamInfo, VideoStreamInfo { this.bitrate, this.audioCodec, this.videoCodec, - this.videoQualityLabel, + @Deprecated('Use qualityLabel') this.videoQualityLabel, this.videoQuality, this.videoResolution, this.framerate, @@ -79,5 +79,5 @@ class MuxedStreamInfo implements AudioStreamInfo, VideoStreamInfo { this.qualityLabel); @override - String toString() => 'Muxed ($tag | $videoQualityLabel | $container)'; + String toString() => 'Muxed ($tag | $qualityLabel | $container)'; } diff --git a/lib/src/videos/streams/streams_client.dart b/lib/src/videos/streams/streams_client.dart index 2d5b1ca..da73e21 100644 --- a/lib/src/videos/streams/streams_client.dart +++ b/lib/src/videos/streams/streams_client.dart @@ -127,7 +127,7 @@ class StreamsClient { // Muxed or Video-only if (!videoCodec.isNullOrWhiteSpace) { var framerate = Framerate(streamInfo.framerate ?? 24); - var videoQualityLabel = streamInfo.videoQualityLabel ?? ''; + var videoQualityLabel = streamInfo.qualityLabel; var videoQuality = VideoQualityUtil.fromLabel(videoQualityLabel); diff --git a/lib/src/videos/streams/video_stream_info.dart b/lib/src/videos/streams/video_stream_info.dart index 6487109..4638a1f 100644 --- a/lib/src/videos/streams/video_stream_info.dart +++ b/lib/src/videos/streams/video_stream_info.dart @@ -29,7 +29,7 @@ abstract class VideoStreamInfo extends StreamInfo { FileSize size, Bitrate bitrate, this.videoCodec, - this.videoQualityLabel, + @Deprecated('Use qualityLabel') this.videoQualityLabel, this.videoQuality, this.videoResolution, this.framerate, @@ -50,8 +50,7 @@ extension VideoStreamInfoExtension on Iterable { /// a collection of video streams. /// This could be longer than [getAllVideoQualities] since this gives also all /// the different framerate values. - Set getAllVideoQualitiesLabel() => - map((e) => e.videoQualityLabel).toSet(); + Set getAllVideoQualitiesLabel() => map((e) => e.qualityLabel).toSet(); /// Gets the stream with best video quality. T withHighestBitrate() => sortByVideoQuality().last;