VideoInfo.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Public Methods
Sets the HDR type of the current media session. Valid values are defined as the HDR_TYPE_*
constants in VideoInfo
.
Sets the height of the video in pixels.
Sets the width of the video in pixels.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eVideoInfo.Builder\u003c/code\u003e is used to create instances of \u003ccode\u003eVideoInfo\u003c/code\u003e, which holds video metadata.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to set video properties like width, height, and HDR type.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method is called to create the final \u003ccode\u003eVideoInfo\u003c/code\u003e object after setting the desired properties.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers use this builder to provide information about the video content being cast.\u003c/p\u003e\n"]]],["The `VideoInfo.Builder` class, an extension of `Object`, is used to create `VideoInfo` objects. Key actions include using the `Builder()` constructor, and methods to customize the video information. The `setHdrType` method defines the HDR type, while `setHeight` and `setWidth` specify video dimensions. The `build()` method finalizes and returns a `VideoInfo` instance. Additionally, several inherited methods from the base `Object` class are also available.\n"],null,["# VideoInfo.Builder\n\npublic static class **VideoInfo.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nBuilder for [VideoInfo](/android/reference/com/google/android/gms/cast/VideoInfo). \n\n### Public Constructor Summary\n\n|---|-----------------------------------------------------------------------------------------|\n| | [Builder](/android/reference/com/google/android/gms/cast/VideoInfo.Builder#Builder())() |\n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [VideoInfo](/android/reference/com/google/android/gms/cast/VideoInfo) | [build](/android/reference/com/google/android/gms/cast/VideoInfo.Builder#build())() Builds a [VideoInfo](/android/reference/com/google/android/gms/cast/VideoInfo). |\n| [VideoInfo.Builder](/android/reference/com/google/android/gms/cast/VideoInfo.Builder) | [setHdrType](/android/reference/com/google/android/gms/cast/VideoInfo.Builder#setHdrType(int))(int hdrType) Sets the HDR type of the current media session. |\n| [VideoInfo.Builder](/android/reference/com/google/android/gms/cast/VideoInfo.Builder) | [setHeight](/android/reference/com/google/android/gms/cast/VideoInfo.Builder#setHeight(int))(int height) Sets the height of the video in pixels. |\n| [VideoInfo.Builder](/android/reference/com/google/android/gms/cast/VideoInfo.Builder) | [setWidth](/android/reference/com/google/android/gms/cast/VideoInfo.Builder#setWidth(int))(int width) Sets the width of the video in pixels. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **Builder** ()\n\nPublic Methods\n--------------\n\n#### public [VideoInfo](/android/reference/com/google/android/gms/cast/VideoInfo)\n**build** ()\n\nBuilds a [VideoInfo](/android/reference/com/google/android/gms/cast/VideoInfo). \n\n#### public [VideoInfo.Builder](/android/reference/com/google/android/gms/cast/VideoInfo.Builder)\n**setHdrType** (int hdrType)\n\nSets the HDR type of the current media session. Valid values are defined as the\n`HDR_TYPE_*` constants in [VideoInfo](/android/reference/com/google/android/gms/cast/VideoInfo). \n\n#### public [VideoInfo.Builder](/android/reference/com/google/android/gms/cast/VideoInfo.Builder)\n**setHeight** (int height)\n\nSets the height of the video in pixels. \n\n#### public [VideoInfo.Builder](/android/reference/com/google/android/gms/cast/VideoInfo.Builder)\n**setWidth** (int width)\n\nSets the width of the video in pixels."]]