類別:CustomStateEvent
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eCustomStateEvent\u003c/code\u003e class provides data for custom state events within the Cast framework.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a \u003ccode\u003estate\u003c/code\u003e property, a non-null object representing the sent media status.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the \u003ccode\u003eCustomStateEvent\u003c/code\u003e constructor with the \u003ccode\u003estate\u003c/code\u003e parameter to create instances of this event.\u003c/p\u003e\n"]]],["The `CustomStateEvent` class provides event data for `cast.framework.events.EventType.CUSTOM_STATE`. It's created with a constructor, `CustomStateEvent(state)`, which requires a non-null Object for the `state` parameter. The class contains one property: `state`, a non-null Object that holds the media status transmitted during the event. This event signifies that a custom state was sent and this class holds the content of that sent custom media status.\n"],null,["# Class: CustomStateEvent\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[events](/cast/docs/reference/web_receiver/cast.framework.events).CustomStateEvent\n=====================================================================================================================================================\n\nclass static\n\nEvent data for a `cast.framework.events.EventType.CUSTOM_STATE` event.\n\nConstructor\n-----------\n\n### CustomStateEvent\n\nnew\nCustomStateEvent(state)\n\n| #### Parameter ||\n|-------|--------------------------------|\n| state | Object Value must not be null. |\n\nProperty\n--------\n\n### state\n\nconstant\n\nnon-null Object\n\nThe media status that was sent."]]