Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ fun VideoPickerDropdown(

// Sample data for the picker
private val sampleVideosForPicker = listOf(
VideoPickerData("Big Buck Bunny", "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4".toUri()),
VideoPickerData("Tears of Steel", "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4".toUri()),
VideoPickerData("For Bigger Blazes", "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4".toUri()),
VideoPickerData("Big Buck Bunny", "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/BigBuckBunny.mp4".toUri()),
VideoPickerData("Tears of Steel", "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/TearsOfSteel.mp4".toUri()),
VideoPickerData("For Bigger Blazes", "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/ForBiggerBlazes.mp4".toUri()),
Comment on lines +250 to +252

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid repeating the same base URL string, consider extracting it into a top-level constant. This makes future updates easier and the code cleaner.

For example:

private const val SAMPLE_VIDEO_BASE_URL = "https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/"

private val sampleVideosForPicker = listOf(
    VideoPickerData("Big Buck Bunny", "${SAMPLE_VIDEO_BASE_URL}BigBuckBunny.mp4".toUri()),
    VideoPickerData("Tears of Steel", "${SAMPLE_VIDEO_BASE_URL}TearsOfSteel.mp4".toUri()),
    VideoPickerData("For Bigger Blazes", "${SAMPLE_VIDEO_BASE_URL}ForBiggerBlazes.mp4".toUri()),
)

)

@Preview
Expand Down
Loading