diff --git a/README.md b/README.md index e1c9735..a0bb74d 100644 --- a/README.md +++ b/README.md @@ -50,20 +50,19 @@ var video = yt.video.get(id); // Returns a Video instance. ``` ## Get video mediaStream -The [MediaStreamsInfoSet][MediaStreamsInfoSet] contains the audio, video and muxed streams of the video. Each of the streams provides an url which can be used to download a video with a get request (See [example][VidExample]). +The Manifest contains the audio, video and muxed streams of the video. Each of the streams provides an url which can be used to download a video with a get request (See [example][VidExample]). ```dart -var mediaStreams = yt.getVideoMediaStream(); +var manifest = yt.videos.streamsClient.getManifest(videoId); -var muxed = mediaStreams.muxed; // List of `MuxedStreamInfo` sorted by video quality. -var audio = mediaStreams.audio; // List of `AudioStreamInfo` sorted by bitrate. -var video = mediaStreams.video; // List of `VideoSteamInfo` sorted by video quality. - -var videoDetails = mediaStreams.videoDetails; //Returns a `Video` instance. Used to avoid calling `yt.getVideo`. +var muxed = manifest.muxed; // List of `MuxedStreamInfo` sorted by video quality. +var audio = manifest.audio; // List of `AudioStreamInfo` sorted by bitrate. +var video = manifest.video; // List of `VideoSteamInfo` sorted by video quality. +// There are available manifest.audioOnly and manifest.videoOnly as well. ``` Be aware, the muxed streams don't hold the best quality, to achieve so, you'd need to merge the audio and video streams. -## Closed Captions +## Closed Captions - Not yet implemented To get the video closed caption it is need to query before the caption track infos, which can be used to retrieve the closed caption. ```dart diff --git a/analysis_options.yaml b/analysis_options.yaml index 2d6f3c4..fd82153 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -14,7 +14,8 @@ linter: - prefer_constructors_over_static_methods - prefer_contains - annotate_overrides - - await_future + - await_only_futures + - unawaited_futures analyzer: exclude: diff --git a/example/video_download.dart b/example/video_download.dart index 1a5e2d0..b7851b4 100644 --- a/example/video_download.dart +++ b/example/video_download.dart @@ -1,3 +1,5 @@ +//TODO: Fixing the console printing. + import 'dart:async'; import 'dart:io';