Skip to content
Merged
Show file tree
Hide file tree
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 @@ -39,7 +39,7 @@ import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch

val MEDIA_SOURCE =
MediaItem.fromUri("https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4")
MediaItem.fromUri("https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/BigBuckBunny.mp4")
Comment on lines 41 to +42

Choose a reason for hiding this comment

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

medium

For better maintainability and to avoid hardcoded values, it's a good practice to extract this URL into a const val. This makes it easier to find and update in the future.

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

val MEDIA_SOURCE =
    MediaItem.fromUri(BIG_BUCK_BUNNY_URL)

.buildUpon().setMediaMetadata(
MediaMetadata.Builder()
.setTitle("Big Buck Bunny")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch

val MEDIA_SOURCE =
MediaItem.fromUri("https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4")
MediaItem.fromUri("https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/BigBuckBunny.mp4")
Comment on lines 38 to +39

Choose a reason for hiding this comment

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

medium

For better maintainability and to avoid hardcoded values, it's a good practice to extract this URL into a const val. This makes it easier to find and update in the future.

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

val MEDIA_SOURCE =
    MediaItem.fromUri(BIG_BUCK_BUNNY_URL)

.buildUpon().setMediaMetadata(
MediaMetadata.Builder()
.setTitle("Big Buck Bunny")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch

val MEDIA_SOURCE =
MediaItem.fromUri("https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4")
MediaItem.fromUri("https://storage.googleapis.com/androiddevelopers/samples_assets/gtv-videos-bucket/sample/BigBuckBunny.mp4")
Comment on lines 37 to +38

Choose a reason for hiding this comment

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

medium

For better maintainability and to avoid hardcoded values, it's a good practice to extract this URL into a const val. This makes it easier to find and update in the future.

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

val MEDIA_SOURCE =
    MediaItem.fromUri(BIG_BUCK_BUNNY_URL)

.buildUpon().setMediaMetadata(
MediaMetadata.Builder()
.setTitle("Big Buck Bunny")
Expand Down