Skip to content

Commit bf59907

Browse files
authored
Merge pull request #200 from chikoski/main
Enable playlist on the video player screen.
2 parents 4f57da5 + 352dcad commit bf59907

File tree

13 files changed

+311
-115
lines changed

13 files changed

+311
-115
lines changed

JetStreamCompose/jetstream/src/main/assets/movies.json

+27-27
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
{
2626
"id": "6f251d94cc5c2",
27-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
27+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
2828
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
2929
"rank": 3,
3030
"rankUpDown": "+23",
@@ -70,7 +70,7 @@
7070
},
7171
{
7272
"id": "51df9ee9a5c29",
73-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
73+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
7474
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
7575
"rank": 5,
7676
"rankUpDown": "+27",
@@ -116,7 +116,7 @@
116116
},
117117
{
118118
"id": "040fab3d5e08e",
119-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
119+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
120120
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
121121
"rank": 7,
122122
"rankUpDown": "+57",
@@ -162,7 +162,7 @@
162162
},
163163
{
164164
"id": "c4278acc58c31",
165-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
165+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
166166
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
167167
"rank": 9,
168168
"rankUpDown": "+29",
@@ -208,7 +208,7 @@
208208
},
209209
{
210210
"id": "feee7e2119c28",
211-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
211+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
212212
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
213213
"rank": 11,
214214
"rankUpDown": "+36",
@@ -254,7 +254,7 @@
254254
},
255255
{
256256
"id": "66f35ba9d671d",
257-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
257+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
258258
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
259259
"rank": 13,
260260
"rankUpDown": "+16",
@@ -300,7 +300,7 @@
300300
},
301301
{
302302
"id": "523d5cdae88f7",
303-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
303+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
304304
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
305305
"rank": 15,
306306
"rankUpDown": "+17",
@@ -346,7 +346,7 @@
346346
},
347347
{
348348
"id": "c10133062b2aa",
349-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
349+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
350350
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
351351
"rank": 18,
352352
"rankUpDown": "+33",
@@ -392,7 +392,7 @@
392392
},
393393
{
394394
"id": "af69b8b439cb9",
395-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
395+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
396396
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
397397
"rank": 20,
398398
"rankUpDown": "+41",
@@ -438,7 +438,7 @@
438438
},
439439
{
440440
"id": "5d428a566a71c",
441-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
441+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
442442
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
443443
"rank": 22,
444444
"rankUpDown": "+28",
@@ -461,7 +461,7 @@
461461
},
462462
{
463463
"id": "84e74ee74bfc",
464-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
464+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
465465
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
466466
"rank": 23,
467467
"rankUpDown": "+48",
@@ -507,7 +507,7 @@
507507
},
508508
{
509509
"id": "aa723f7cb6d5d",
510-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
510+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
511511
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
512512
"rank": 25,
513513
"rankUpDown": "+35",
@@ -553,7 +553,7 @@
553553
},
554554
{
555555
"id": "f1b81e90f812",
556-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
556+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
557557
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
558558
"rank": 27,
559559
"rankUpDown": "+22",
@@ -599,7 +599,7 @@
599599
},
600600
{
601601
"id": "504431d1aca8",
602-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
602+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
603603
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
604604
"rank": 29,
605605
"rankUpDown": "+39",
@@ -645,7 +645,7 @@
645645
},
646646
{
647647
"id": "c08e5ae6ecc9f",
648-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
648+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
649649
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
650650
"rank": 31,
651651
"rankUpDown": "+42",
@@ -691,7 +691,7 @@
691691
},
692692
{
693693
"id": "40353aa9623af",
694-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
694+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
695695
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
696696
"rank": 33,
697697
"rankUpDown": "+51",
@@ -714,7 +714,7 @@
714714
},
715715
{
716716
"id": "64e067f836ca2",
717-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
717+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
718718
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
719719
"rank": 34,
720720
"rankUpDown": "+31",
@@ -760,7 +760,7 @@
760760
},
761761
{
762762
"id": "61946ea9ede15",
763-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
763+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
764764
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
765765
"rank": 36,
766766
"rankUpDown": "+21",
@@ -829,7 +829,7 @@
829829
},
830830
{
831831
"id": "08ef353fd4def",
832-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
832+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
833833
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
834834
"rank": 39,
835835
"rankUpDown": "+55",
@@ -875,7 +875,7 @@
875875
},
876876
{
877877
"id": "43e5a062e2bfc",
878-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
878+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
879879
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
880880
"rank": 41,
881881
"rankUpDown": "+48",
@@ -921,7 +921,7 @@
921921
},
922922
{
923923
"id": "73ce574852058",
924-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
924+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
925925
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
926926
"rank": 43,
927927
"rankUpDown": "+19",
@@ -967,7 +967,7 @@
967967
},
968968
{
969969
"id": "defa276de73e5",
970-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
970+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
971971
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
972972
"rank": 45,
973973
"rankUpDown": "+54",
@@ -990,7 +990,7 @@
990990
},
991991
{
992992
"id": "d84978bdf9622",
993-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
993+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
994994
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
995995
"rank": 46,
996996
"rankUpDown": "+33",
@@ -1036,7 +1036,7 @@
10361036
},
10371037
{
10381038
"id": "834ce43565946",
1039-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
1039+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
10401040
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
10411041
"rank": 48,
10421042
"rankUpDown": "+57",
@@ -1082,7 +1082,7 @@
10821082
},
10831083
{
10841084
"id": "07c92f3a31737",
1085-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
1085+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
10861086
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
10871087
"rank": 50,
10881088
"rankUpDown": "+30",
@@ -1128,7 +1128,7 @@
11281128
},
11291129
{
11301130
"id": "b995170bc926",
1131-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
1131+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
11321132
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
11331133
"rank": 52,
11341134
"rankUpDown": "+46",
@@ -1174,7 +1174,7 @@
11741174
},
11751175
{
11761176
"id": "5be58f705ee35",
1177-
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
1177+
"videoUri": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",
11781178
"subtitleUri": "https://thepaciellogroup.github.io/AT-browser-tests/video/subtitles-en.vtt",
11791179
"rank": 54,
11801180
"rankUpDown": "+54",

JetStreamCompose/jetstream/src/main/java/com/google/jetstream/data/entities/MovieDetails.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ data class MovieDetails(
3636
val budget: String,
3737
val revenue: String,
3838
val similarMovies: MovieList,
39-
val reviewsAndRatings: List<MovieReviewsAndRatings>
39+
val reviewsAndRatings: List<MovieReviewsAndRatings>,
4040
)

JetStreamCompose/jetstream/src/main/java/com/google/jetstream/data/repositories/MovieRepositoryImpl.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class MovieRepositoryImpl @Inject constructor(
8080
override suspend fun getMovieDetails(movieId: String): MovieDetails {
8181
val movieList = movieDataSource.getMovieList()
8282
val movie = movieList.find { it.id == movieId } ?: movieList.first()
83-
val similarMovieList = movieList.shuffled().subList(0, 2)
83+
val similarMovieList = movieList.subList(1, 4)
8484
val castList = movieCastDataSource.getMovieCastList()
8585

8686
return MovieDetails(
@@ -116,7 +116,7 @@ class MovieRepositoryImpl @Inject constructor(
116116
reviewCount = DefaultCount,
117117
reviewRating = DefaultRating
118118
),
119-
)
119+
),
120120
)
121121
}
122122

JetStreamCompose/jetstream/src/main/java/com/google/jetstream/data/util/StringConstants.kt

+6
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,11 @@ object StringConstants {
125125
const val VideoPlayerControlSettingsButton = "Playlist Button"
126126
const val VideoPlayerControlPlayPauseButton = "Playlist Button"
127127
const val VideoPlayerControlForward = "Fast forward 10 seconds"
128+
const val VideoPlayerControlSkipNextButton = "Skip to the next movie"
129+
const val VideoPlayerControlSkipPreviousButton = "Skip to the previous movie"
130+
const val VideoPlayerControlRepeatAll = "Repeat all movies"
131+
const val VideoPlayerControlRepeatOne = "Repeat movie"
132+
const val VideoPlayerControlRepeatNone = "No repeat"
133+
const val VideoPlayerControlRepeatButton = "Repeat Button"
128134
}
129135
}

0 commit comments

Comments
 (0)