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 'package:youtube_explode_dart/youtube_explode_dart.dart';
import 'dart:convert';
Future<void> main() async { Future<void> main() async {
var yt = YoutubeExplode(); var yt = YoutubeExplode();
var manifest = await yt.videos.closedCaptions var manifest = await yt.videos.closedCaptions
.getManifest('ppJy5uGZLi4', autoGenerated: true); .getManifest('Pxgvgh9IFqA', autoGenerated: true);
var trackInfo = manifest.getByLanguage('en'); print(manifest.tracks);
var track = await yt.videos.closedCaptions.get(trackInfo.first); print('\n\n---------------------\n\n');
print(json.encode(track.toJson()));
manifest = await yt.videos.closedCaptions
.getManifest('Pxgvgh9IFqA', autoGenerated: false);
print(manifest.tracks);
yt.close();
} }