You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1) Improved State Management: The outputText state in VideoSummarizationScreen.kt has been refactored to use a more robust OutputTextState sealed class and derivedStateOf. This allows for better handling of different states (e.g., success, loading, error) and more reactive UI updates, such as conditionally showing the 'Listen' button only when output text is successfully generated.
(2) Video List Refactoring: The hardcoded list of sample videos has been refactored from an instantiated VideoList class to a top-level sampleVideoList constant in VideoList.kt. This simplifies access and aligns with common Kotlin practices for static data.
(3) Linting and Code Cleanup: Various minor lint fixes and code cleanups have been applied across the codebase. This includes adopting the androidx.core.net.toUri() extension function for URI creation, optimizing variable declarations (e.g., using val instead of var where appropriate), removing unused state variables, and deleting outdated comment blocks.
(4) Text-to-Speech Logic Fix: A fix was implemented in TextToSpeechControls.kt to correctly check the Text-to-Speech language support by using textToSpeech?.voice?.locale instead of the less precise textToSpeech?.language
Copy file name to clipboardExpand all lines: ai-catalog/samples/gemini-video-summarization/src/main/java/com/android/ai/samples/geminivideosummary/VideoSummarizationScreen.kt
Copy file name to clipboardExpand all lines: ai-catalog/samples/gemini-video-summarization/src/main/java/com/android/ai/samples/geminivideosummary/player/VideoPlayer.kt
Copy file name to clipboardExpand all lines: ai-catalog/samples/gemini-video-summarization/src/main/java/com/android/ai/samples/geminivideosummary/player/VideoSelectionDropdown.kt
Copy file name to clipboardExpand all lines: ai-catalog/samples/gemini-video-summarization/src/main/java/com/android/ai/samples/geminivideosummary/ui/TextToSpeechControls.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ private fun handleSpeakButtonClick(
Copy file name to clipboardExpand all lines: ai-catalog/samples/gemini-video-summarization/src/main/java/com/android/ai/samples/geminivideosummary/util/VideoList.kt
0 commit comments