Nouveau volume du flux. Vous devez définir au moins un niveau ou le son.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 2025/07/25 (UTC)."],[[["\u003cp\u003e\u003ccode\u003echrome.cast.media.VolumeRequest\u003c/code\u003e is a class used to set the volume of media playing on a cast device.\u003c/p\u003e\n"],["\u003cp\u003eIt's constructed using \u003ccode\u003enew VolumeRequest(volume)\u003c/code\u003e where \u003ccode\u003evolume\u003c/code\u003e is a \u003ccode\u003echrome.cast.Volume\u003c/code\u003e object specifying the desired volume level.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVolumeRequest\u003c/code\u003e object has two properties: \u003ccode\u003ecustomData\u003c/code\u003e for sending custom information to the receiver and \u003ccode\u003evolume\u003c/code\u003e which sets the new volume level or mute state.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evolume\u003c/code\u003e property within \u003ccode\u003eVolumeRequest\u003c/code\u003e requires at least either the \u003ccode\u003elevel\u003c/code\u003e or \u003ccode\u003emuted\u003c/code\u003e attribute of the \u003ccode\u003echrome.cast.Volume\u003c/code\u003e object to be defined.\u003c/p\u003e\n"]]],[],null,["# Class: VolumeRequest\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).[media](/cast/docs/reference/web_sender/chrome.cast.media).VolumeRequest\n===================================================================================================================================\n\nclass static\n\nA request to set the stream volume of the playing media.\n\nConstructor\n-----------\n\n### VolumeRequest\n\nnew\nVolumeRequest(volume)\n\n| #### Parameter ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------|\n| volume | [chrome.cast.Volume](/cast/docs/reference/web_sender/chrome.cast.Volume) The new volume of the stream. Value must not be null. |\n\nProperties\n----------\n\n### customData\n\nnullable Object\n\nCustom data for the receiver application.\n\n### volume\n\nnon-null [chrome.cast.Volume](/cast/docs/reference/web_sender/chrome.cast.Volume)\n\nThe new volume of the stream. At least one of level or muted must be\nset."]]