方法簽章 Subscribable.unsubscribe
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
從訂閱者清單中移除回呼。必須將原始回呼例項做為引數傳入。
簽名
unsubscribe(callback: (value: T) => void): boolean;
詳細資料
參數
名稱 |
類型 |
選用 |
說明 |
callback |
(value: T) => void |
否 |
|
傳回
boolean
如果已移除回呼,則傳回「是」;如果未找到回呼,則傳回「否」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# Method signature Subscribable.unsubscribe\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. \n|\n| **To use the Meet Media API to access real-time media from a conference, the Google Cloud project, OAuth principal, and all participants in the conference must be enrolled in the Developer Preview Program.**\n\nRemoves the callback from the list of subscribers. The original callback\ninstance must be passed in as an argument.\n\nSignature\n---------\n\n unsubscribe(callback: (value: T) =\u003e void): boolean;\n\nDetails\n-------\n\n| Optional | No |\n|----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|------------|----------------------|----------|-------------|\n| `callback` | `(value: T) =\u003e void` | No | |\n\nReturns\n-------\n\n`boolean`\n\nTrue if the callback was removed, false if it was not found."]]