parent
297d2ce2a4
commit
721ad7e2d5
|
@ -1,3 +1,6 @@
|
|||
## 1.9.4
|
||||
- Fix issue #126
|
||||
|
||||
## 1.9.3+2
|
||||
- Fix `ChannelUploadsList`.
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class VideoInfoResponse {
|
|||
[String? sts]) {
|
||||
var eurl = Uri.encodeFull('https://youtube.googleapis.com/v/$videoId');
|
||||
var url =
|
||||
'https://youtube.com/get_video_info?video_id=$videoId&el=embedded&eurl=$eurl&hl=en${sts != null ? '&sts=$sts' : ''}';
|
||||
'https://youtube.com/get_video_info?video_id=$videoId&el=embedded&eurl=$eurl&hl=en${sts != null ? '&sts=$sts' : ''}&html5=1';
|
||||
return retry(() async {
|
||||
var raw = await httpClient.getString(url);
|
||||
var result = VideoInfoResponse.parse(raw);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: youtube_explode_dart
|
||||
description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
|
||||
version: 1.9.3+2
|
||||
version: 1.9.4
|
||||
|
||||
homepage: https://github.com/Hexer10/youtube_explode_dart
|
||||
|
||||
|
@ -18,7 +18,6 @@ dependencies:
|
|||
xml: ^5.0.2
|
||||
|
||||
dev_dependencies:
|
||||
#TODO: Add build_runner when is nnbd
|
||||
build_runner: ^1.12.2
|
||||
console: ^4.0.0
|
||||
grinder: ^0.9.0-nullsafety.0
|
||||
|
|
|
@ -48,23 +48,33 @@ void main() {
|
|||
|
||||
group('Get specific stream of any playable video', () {
|
||||
for (final val in {
|
||||
VideoId('9bZkp7q19f0'), // very popular
|
||||
// VideoId('SkRSXFQerZs'), // age restricted (embed allowed) - This is unplayable
|
||||
VideoId('hySoCSoH-g8'), // age restricted (embed not allowed)
|
||||
VideoId('_kmeFXjjGfk'), // embed not allowed (type 1)
|
||||
VideoId('MeJVWBSsPAY'), // embed not allowed (type 2)
|
||||
VideoId('5VGm0dczmHc'), // rating not allowed
|
||||
VideoId('ZGdLIwrGHG8'), // unlisted
|
||||
VideoId('rsAAeyAr-9Y'), // recording of a live stream
|
||||
VideoId('AI7ULzgf8RU'), // has DASH manifest TODO: Test timesout
|
||||
VideoId('-xNN-bJQ4vI'), // 360° video
|
||||
VideoId('9bZkp7q19f0'),
|
||||
// very popular
|
||||
VideoId(
|
||||
'SkRSXFQerZs'), // age restricted (embed allowed) - This is unplayable
|
||||
VideoId('hySoCSoH-g8'),
|
||||
// age restricted (embed not allowed)
|
||||
VideoId('_kmeFXjjGfk'),
|
||||
// embed not allowed (type 1)
|
||||
VideoId('MeJVWBSsPAY'),
|
||||
// embed not allowed (type 2)
|
||||
VideoId('5VGm0dczmHc'),
|
||||
// rating not allowed
|
||||
VideoId('ZGdLIwrGHG8'),
|
||||
// unlisted
|
||||
VideoId('rsAAeyAr-9Y'),
|
||||
// recording of a live stream
|
||||
VideoId('AI7ULzgf8RU'),
|
||||
// has DASH manifest
|
||||
VideoId('-xNN-bJQ4vI'),
|
||||
// 360° video
|
||||
}) {
|
||||
test('VideoId - ${val.value}', () async {
|
||||
var manifest = await yt!.videos.streamsClient.getManifest(val);
|
||||
for (final streamInfo in manifest.streams) {
|
||||
expect(yt!.videos.streamsClient.get(streamInfo), emits(isNotNull));
|
||||
expect(yt!.videos.streamsClient.get(streamInfo).first, completes);
|
||||
}
|
||||
});
|
||||
}, timeout: const Timeout(Duration(minutes: 5)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue