@@ -13,16 +13,19 @@ void main() {
13
13
14
14
group ('Get streams manifest of any video' , () {
15
15
for (final val in {
16
- VideoId ('9bZkp7q19f0' ), // very popular
17
- VideoId (
18
- 'SkRSXFQerZs' ), // age restricted (embed allowed) - This is unplayable
19
- VideoId ('hySoCSoH-g8' ), // age restricted (embed not allowed)
20
- VideoId ('_kmeFXjjGfk' ), // embed not allowed (type 1)
21
- VideoId ('MeJVWBSsPAY' ), // embed not allowed (type 2)
22
- VideoId ('5VGm0dczmHc' ), // rating not allowed
23
- VideoId ('ZGdLIwrGHG8' ), // unlisted
24
- VideoId ('rsAAeyAr-9Y' ), // recording of a live stream
25
- VideoId ('AI7ULzgf8RU' ), // has DASH manifest
16
+ VideoId ('9bZkp7q19f0' ), //Normal
17
+ VideoId ('ZGdLIwrGHG8' ), //Unlisted
18
+ VideoId ('rsAAeyAr-9Y' ), //LiveStreamRecording
19
+ VideoId ('V5Fsj_sCKdg' ), //ContainsHighQualityStreams
20
+ VideoId ('AI7ULzgf8RU' ), //ContainsDashManifest
21
+ VideoId ('-xNN-bJQ4vI' ), //Omnidirectional
22
+ VideoId ('vX2vsvdq8nw' ), //HighDynamicRange
23
+ VideoId ('YltHGKX80Y8' ), //ContainsClosedCaptions
24
+ VideoId ('_kmeFXjjGfk' ), //EmbedRestrictedByYouTube
25
+ VideoId ('MeJVWBSsPAY' ), //EmbedRestrictedByAuthor
26
+ VideoId ('SkRSXFQerZs' ), //AgeRestricted
27
+ VideoId ('hySoCSoH-g8' ), //AgeRestrictedEmbedRestricted
28
+ VideoId ('5VGm0dczmHc' ), //RatingDisabled
26
29
VideoId ('-xNN-bJQ4vI' ), // 360° video
27
30
}) {
28
31
test ('VideoId - ${val .value }' , () async {
@@ -37,6 +40,13 @@ void main() {
37
40
throwsA (const TypeMatcher <VideoRequiresPurchaseException >()));
38
41
});
39
42
43
+ test ('Get the hls manifest of a live stream' , () async {
44
+ expect (
45
+ await yt! .videos.streamsClient
46
+ .getHttpLiveStreamUrl (VideoId ('5qap5aO4i9A' )),
47
+ isNotEmpty);
48
+ });
49
+
40
50
group ('Stream of unavailable videos throws VideoUnavailableException' , () {
41
51
for (final val in {VideoId ('qld9w0b-1ao' ), VideoId ('pb_hHv3fByo' )}) {
42
52
test ('VideoId - ${val .value }' , () {
@@ -48,26 +58,19 @@ void main() {
48
58
49
59
group ('Get specific stream of any playable video' , () {
50
60
for (final val in {
51
- VideoId ('9bZkp7q19f0' ),
52
- // very popular
53
- VideoId (
54
- 'SkRSXFQerZs' ), // age restricted (embed allowed) - This is unplayable
55
- VideoId ('hySoCSoH-g8' ),
56
- // age restricted (embed not allowed)
57
- VideoId ('_kmeFXjjGfk' ),
58
- // embed not allowed (type 1)
59
- VideoId ('MeJVWBSsPAY' ),
60
- // embed not allowed (type 2)
61
- // VideoId('5VGm0dczmHc'),
62
- // rating not allowed
63
- VideoId ('ZGdLIwrGHG8' ),
64
- // unlisted
65
- VideoId ('rsAAeyAr-9Y' ),
66
- // recording of a live stream
67
- VideoId ('AI7ULzgf8RU' ),
68
- // has DASH manifest
69
- VideoId ('-xNN-bJQ4vI' ),
70
- // 360° video
61
+ VideoId ('9bZkp7q19f0' ), //Normal
62
+ VideoId ('ZGdLIwrGHG8' ), //Unlisted
63
+ VideoId ('rsAAeyAr-9Y' ), //LiveStreamRecording
64
+ VideoId ('V5Fsj_sCKdg' ), //ContainsHighQualityStreams
65
+ VideoId ('AI7ULzgf8RU' ), //ContainsDashManifest
66
+ VideoId ('-xNN-bJQ4vI' ), //Omnidirectional
67
+ VideoId ('vX2vsvdq8nw' ), //HighDynamicRange
68
+ VideoId ('YltHGKX80Y8' ), //ContainsClosedCaptions
69
+ VideoId ('_kmeFXjjGfk' ), //EmbedRestrictedByYouTube
70
+ VideoId ('MeJVWBSsPAY' ), //EmbedRestrictedByAuthor
71
+ VideoId ('SkRSXFQerZs' ), //AgeRestricted
72
+ VideoId ('hySoCSoH-g8' ), //AgeRestrictedEmbedRestricted
73
+ VideoId ('5VGm0dczmHc' ), //RatingDisabled
71
74
}) {
72
75
test ('VideoId - ${val .value }' , () async {
73
76
var manifest = await yt! .videos.streamsClient.getManifest (val);
0 commit comments