Class: VolumeRequestData
Stay organized with collections
Save and categorize content based on your preferences.
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-09-18 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-09-18 UTC."],[[["\u003cp\u003e\u003ccode\u003eVolumeRequestData\u003c/code\u003e is used for \u003ccode\u003eSET_VOLUME\u003c/code\u003e media event requests, allowing senders to adjust the volume on the receiver.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits properties like \u003ccode\u003erequestId\u003c/code\u003e, \u003ccode\u003emediaSessionId\u003c/code\u003e, and \u003ccode\u003ecustomData\u003c/code\u003e from \u003ccode\u003eRequestData\u003c/code\u003e for request management and application-specific data.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evolume\u003c/code\u003e property is a crucial part of this request, specifying the desired volume level using a \u003ccode\u003ecast.framework.messages.Volume\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage \u003ccode\u003esequenceNumber\u003c/code\u003e to synchronize queue commands and ensure consistency in handling media playback requests.\u003c/p\u003e\n"]]],["`VolumeRequestData` is a class for media event requests to set volume. It extends `RequestData` and includes properties like `customData`, enabling application-specific data exchange, and `mediaSessionId`, to specify the session for the request. It also contains `requestId` for request-response correlation, `sequenceNumber` for synchronizing queue commands, and `volume`, which represents the media stream volume to be set. The class facilitates volume control operations within the media framework.\n"],null,["# Class: VolumeRequestData\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[messages](/cast/docs/reference/web_receiver/cast.framework.messages).VolumeRequestData\n==========================================================================================================================================================\n\nclass static\n\nMedia event SET_VOLUME request data.\n\nConstructor\n-----------\n\n### VolumeRequestData\n\nnew\nVolumeRequestData()\n\nExtends\n: [cast.framework.messages.RequestData](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData)\n\nProperties\n----------\n\n### customData\n\n(non-null Object or undefined)\n\nApplication-specific data for this request. It enables the sender and\nreceiver to easily extend the media protocol without having to use a new\nnamespace with custom messages.\n\nInherited from\n: [cast.framework.messages.RequestData#customData](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#customData)\n\n### mediaSessionId\n\n(number or undefined)\n\nId of the media session that the request applies to.\n\nInherited from\n: [cast.framework.messages.RequestData#mediaSessionId](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#mediaSessionId)\n\n### requestId\n\nnumber\n\nId of the request, used to correlate request/response.\n\nInherited from\n: [cast.framework.messages.RequestData#requestId](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#requestId)\n\n### sequenceNumber\n\n(number or undefined)\n\nA number to synchronize all queue commands.\nIf provided for a queue command, the SDK will verify the queue latest\nsequence number match the request.\nCurrent sequenceNumber is provided as part of outgoing queue changed\nmessages.\n\nInherited from\n: [cast.framework.messages.RequestData#sequenceNumber](/cast/docs/reference/web_receiver/cast.framework.messages.RequestData#sequenceNumber)\n\n### volume\n\nnon-null [cast.framework.messages.Volume](/cast/docs/reference/web_receiver/cast.framework.messages.Volume)\n\nThe media stream volume."]]