État du destinataire affiché dans l'interface utilisateur de l'extension.
Uniquement valide pour les destinataires PERSONNALISÉS. Pour afficher le récepteur comme inactif, définissez displayStatus sur "null".
friendlyName
chaîne
Nom donné de l'utilisateur (avec caractères d'échappement dans l'URI) du destinataire. Obligatoire.
isActiveInput
nullable boolean
La valeur indique si l'appareil Cast est l'entrée active.
Si l'entrée HDMI à laquelle l'appareil Cast est connecté est compatible avec le CEC et que l'appareil peut connaître l'état actif, cette valeur est fournie.
Sinon, la valeur est nulle.
étiquette
chaîne
Identifiant du récepteur propre au profil de navigateur et à l'origine du client API. Elle est stable lors des redémarrages du navigateur, mais peut changer si l'utilisateur efface son espace de stockage local.
Volume actuel du récepteur. Si la valeur n'est pas nulle, le niveau du volume et les propriétés de désactivation du son seront toujours définis.
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.Receiver\u003c/code\u003e objects describe a receiver running an application and are typically not created directly by the client.\u003c/p\u003e\n"],["\u003cp\u003eReceivers have properties like \u003ccode\u003efriendlyName\u003c/code\u003e, \u003ccode\u003ecapabilities\u003c/code\u003e, \u003ccode\u003evolume\u003c/code\u003e, and \u003ccode\u003ereceiverType\u003c/code\u003e providing information about the device.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elabel\u003c/code\u003e property uniquely identifies the receiver within the browser profile and origin, persisting across restarts unless local storage is cleared.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edisplayStatus\u003c/code\u003e property, specific to custom receivers, controls the status displayed in the extension UI and can be set to null for idle.\u003c/p\u003e\n"],["\u003cp\u003eWhile \u003ccode\u003evolume\u003c/code\u003e reflects the current receiver volume, \u003ccode\u003eisActiveInput\u003c/code\u003e indicates if the cast device is the active input source, if supported and detectable.\u003c/p\u003e\n"]]],[],null,["# Class: Receiver\n\nchrome.[cast](/cast/docs/reference/web_sender/chrome.cast).Receiver\n===================================================================\n\nclass static\n\nDescribes the receiver running an application.\nNormally, these objects should not be created by the client.\n\nConstructor\n-----------\n\n### Receiver\n\nnew\nReceiver(label, friendlyName, capabilities, volume)\n\n| #### Parameter ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| label | string An identifier for the receiver. |\n| friendlyName | string The user-visible name of the receiver. |\n| capabilities | Optional Array of non-null [chrome.cast.Capability](/cast/docs/reference/web_sender/chrome.cast#.Capability) Set of receiver capabilities. Value must not be null. |\n| volume | Optional [chrome.cast.Volume](/cast/docs/reference/web_sender/chrome.cast.Volume) The receiver's current volume. Value must not be null. |\n\nProperties\n----------\n\n### capabilities\n\nnon-null Array of non-null [chrome.cast.Capability](/cast/docs/reference/web_sender/chrome.cast#.Capability)\n\nThe capabilities of the receiver, for example audio and video.\n\n### displayStatus\n\nnullable [chrome.cast.ReceiverDisplayStatus](/cast/docs/reference/web_sender/chrome.cast.ReceiverDisplayStatus)\n\nReceiver status shown to the user in the extension UI.\nOnly valid for CUSTOM receivers. To show the receiver as idle,\nset displayStatus to null.\n\n### friendlyName\n\nstring\n\nThe user given name (URI-escaped) for the receiver. Mandatory.\n\n### isActiveInput\n\nnullable boolean\n\nThe value reflects whether the cast device is the active input.\nIf the HDMI input the Cast device is connected to supports CEC and\nthe device can know the active status, this value will be provided.\nOtherwise, it is null.\n\n### label\n\nstring\n\nAn identifier for the receiver that is unique to the browser\nprofile and the origin of the API client. It is stable across browser\nrestarts, but may change if the user clears his local storage.\n\n### receiverType\n\nnon-null [chrome.cast.ReceiverType](/cast/docs/reference/web_sender/chrome.cast#.ReceiverType)\n\nThe type of receiver device. Mandatory.\n\n### volume\n\nnullable [chrome.cast.Volume](/cast/docs/reference/web_sender/chrome.cast.Volume)\n\nThe current volume of the receiver. If non-null, the volume's level and\nmuted properties will always be set."]]