diff --git a/example/example.dart b/example/example.dart index 6debfde..8b509c5 100644 --- a/example/example.dart +++ b/example/example.dart @@ -1,12 +1,15 @@ import 'package:youtube_explode_dart/youtube_explode_dart.dart'; -import 'dart:convert'; Future main() async { var yt = YoutubeExplode(); var manifest = await yt.videos.closedCaptions - .getManifest('ppJy5uGZLi4', autoGenerated: true); - var trackInfo = manifest.getByLanguage('en'); - var track = await yt.videos.closedCaptions.get(trackInfo.first); - print(json.encode(track.toJson())); + .getManifest('Pxgvgh9IFqA', autoGenerated: true); + print(manifest.tracks); + print('\n\n---------------------\n\n'); + + manifest = await yt.videos.closedCaptions + .getManifest('Pxgvgh9IFqA', autoGenerated: false); + print(manifest.tracks); + yt.close(); }