Skip to content

Commit 89c3e53

Browse files
authored
[AI] Adjust sendVideoRealtime kdoc (#7502)
The doc must accurately describe that the expected data is a video *frame* rather than actual video data. Description is aligned to the iOS description from firebase/firebase-ios-sdk#15432
1 parent e0e995a commit 89c3e53

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/LiveSession.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,16 @@ internal constructor(
331331
}
332332

333333
/**
334-
* Sends a video input stream to the model, using the realtime API.
334+
* Sends a video frame to the model, using the realtime API.
335335
*
336-
* @param video Encoded video data, used to update the model on the client's conversation. The
337-
* MIME type can be a video format (e.g., `video/webm`) or an image format (e.g., `image/jpeg`).
336+
* Instead of raw video data, the model expects individual frames of the video, sent as images.
337+
*
338+
* For better performance, frames can also be sent at a lower rate than the video; even as low as
339+
* 1 frame per second.
340+
*
341+
* @param inlineData Encoded image data extracted from a frame of the video, used to update the
342+
* model on the client's conversation, with the corresponding IANA standard MIME type of the video
343+
* frame data (e.g., `image/png`, `image/jpeg`, etc.).
338344
*/
339345
public suspend fun sendVideoRealtime(video: InlineData) {
340346
FirebaseAIException.catchAsync {

0 commit comments

Comments
 (0)