Video program attributes
Stay organized with collections
Save and categorize content based on your preferences.
A video program's attributes depend on the type of its content. The program type tells the system what metadata to expect so that the UI can be filled in appropriately.
Video programs can be one of the following types:
Use PreviewProgram.Builder to build a program. You can read more about possible values for each field in the reference docs for each setter on the builder.
Kotlin
valprogram=PreviewProgram.Builder() .setChannelId(channelId) .setTitle(clip.getTitle()) .setDescription(clip.getDescription()) .setType(TvContractCompat.PreviewPrograms.TYPE_MOVIE) // Set required attributes .build()
Java
PreviewProgramprogram=newPreviewProgram.Builder() .setChannelId(channelId) .setTitle(clip.getTitle()) .setDescription(clip.getDescription()) .setType(TvContractCompat.PreviewPrograms.TYPE_MOVIE) // Set required attributes .build();
The following table shows the attributes that can be assigned to each type of
video program. Each attribute links to the corresponding setter in
PreviewProgram.Builder.
Attributes marked ✔ are required; those marked (✔) are optional.
| Attribute | Movie | TV Series | TV Season | TV Episode | Clip | Event | Channel |
|---|---|---|---|---|---|---|---|
| Author | (✔) | ||||||
| Availability | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Canonical Genres | (✔) | (✔) | (✔) | (✔) | |||
| Channel ID | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Content ID | (✔) | ||||||
| Content Ratings | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| DurationMillis | ✔ | ✔ | ✔ | (✔) | |||
| Episode Number | ✔ | ||||||
| Episode Title | (✔) | ||||||
| Genre | (✔) | (✔) | (✔) | (✔) | |||
| Intent URI | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Interaction Count | (✔) | (✔) | |||||
| Interaction Type | (✔) | (✔) | |||||
| Internal Provider ID | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Item Count | (✔) | (✔) | |||||
| Live | (✔) | (✔) | (✔) | (✔) | (✔) | ||
| Logo URI (*) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Logo Content Description (*) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Offer Price | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Poster Art Aspect Ratio | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Poster Art URI | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Preview Video URI | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Release Date | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | |
| Review Rating | (✔) | (✔) | (✔) | (✔) | (✔) | ||
| Review Rating Style | (✔) | (✔) | (✔) | (✔) | (✔) | ||
| Season Display Number | ✔ | ✔ | |||||
| Short Description | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Start Time UTC Millis (*) | ✔ | ✔ | ✔ | ✔ | |||
| End Time UTC Millis (*) | ✔ | ✔ | ✔ | ✔ | |||
| Starting Price | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Thumbnail Aspect Ratio | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Thumbnail URI | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Title | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| Video Height | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Video Width | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
| Weight | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) | (✔) |
Preview images
The recommended sizes for preview images are as follows:
ASPECT_RATIO_16_9
16:9
272 dp
153 dp
ASPECT_RATIO_3_2
3:2
229.5 dp
153 dp
ASPECT_RATIO_4_3
4:3
204 dp
153 dp
ASPECT_RATIO_1_1
1:1
153 dp
153 dp
ASPECT_RATIO_2_3
2:3
102 dp
153 dp
ASPECT_RATIO_MOVIE_POSTER
1:1.441
106 dp
153 dp
For best quality, use 16:9 or 4:3 preview videos that are at least the sizes specified in this table. Use an opaque logo for the best user experience.
You can specify the exact preview video sizes using VIDEO_WIDTH
and VIDEO_HEIGHT.