Revert example.dart

This commit is contained in:
Mattia 2020-11-13 09:21:36 +01:00
parent 4f01455f8f
commit 40873f5893
1 changed files with 8 additions and 5 deletions

View File

@ -1,12 +1,15 @@
import 'package:youtube_explode_dart/youtube_explode_dart.dart';
import 'dart:convert';
Future<void> 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();
}