I am having trouble with documentation of youtube_explode_dart
package in flutter. I am trying to build a music streaming app using this package and firebase storage but their seems to be some mistake in the documentation code(code given below)
// Get highest quality muxed stream
var streamInfo = streamManifest.muxed.withHigestVideoQuality();
// ...or highest bitrate audio-only stream
var streamInfo = streamManifest.audioOnly.withHigestBitrate()
// ...or highest quality MP4 video-only stream
var streamInfo.videoOnly.where((e) => e.container == Container)
When I try using this code it says streamManifest
is not defined name which is correct because it is not defined!. I tried to fix it by declaring streamManifest
but no use. Can anyone please check this or If they have already used this package then please help. Some good help will be really appreciated.
Link to the documentation - https://pub.dev/packages/youtube_explode_dart
As mentioned in the package documentation, you can find a working example on GitHub
var yt = YoutubeExplode();
var id = VideoId("https://youtu.be/cqY_tJfhKLw");//for example
var video = await yt.videos.get(id);
// Get the streams manifest and the audio track.
var manifest = await yt.videos.streamsClient.getManifest(id);
var audio = manifest.audioOnly.last;