<GCKSessionManagerListener> 通訊協定(<)

<GCKSessionManagerListener> 通訊協定參考資料

總覽

GCKSessionManager 事件監聽器通訊協定。

通訊協定的方法皆為選用。所有的通知方法都分為兩種:一種是針對任何工作階段類型叫用,另一種則是專為投放工作階段叫用。

事件監聽器會按照註冊順序叫用。GCKSessionManagerListener 例項是由架構本身元件 (例如 GCKUIMediaController) 註冊的 GCKSessionManagerListener 例項,在由應用程式為 sessionManager:willStartSession: (GCKSessionManagerListener-p)sessionManager:willStartCastSession: (GCKSessionManagerListener-p)sessionManager:willResumeSession: (GCKSessionManagerListener-p)sessionManager:willResumeCastSession: (GCKSessionManagerListener-p) 回呼的「之後」再叫用;以及由應用程式針對所有其餘回呼註冊「之前」

開始時間
3.0

繼承 <NSObjectNSObject>。

執行個體方法摘要

(void) - sessionManager:willStartSession:
 在工作階段即將開始時呼叫。更多...
 
(void) - sessionManager:didStartSession:
 在工作階段成功啟動時呼叫。更多...
 
(void) - sessionManager:willStartCastSession:
 在投放工作階段即將開始時呼叫。更多...
 
(void) - sessionManager:didStartCastSession:
 在成功開始投放工作階段時呼叫。更多...
 
(void) - sessionManager:willEndSession:
 當工作階段即將按要求或因錯誤而結束時呼叫。更多...
 
(void) - sessionManager:didEndSession:withError:
 工作階段結束 (依要求或錯誤) 時呼叫。更多...
 
(void) - sessionManager:willEndCastSession:
 當投放工作階段即將根據要求或發生錯誤時呼叫。更多...
 
(void) - sessionManager:didEndCastSession:withError:
 投放工作階段結束時 (無論是要求或發生錯誤) 時呼叫。更多...
 
(void) - sessionManager:didFailToStartSession:withError:
 在工作階段無法開始時呼叫。更多...
 
(void) - sessionManager:didFailToStartCastSession:withError:
 投放工作階段無法開始時呼叫。更多...
 
(void) - sessionManager:didSuspendSession:withReason:
 在工作階段暫停時呼叫。更多...
 
(void) - sessionManager:didSuspendCastSession:withReason:
 在投放工作階段暫停時呼叫。更多...
 
(void) - sessionManager:willResumeSession:
 在工作階段即將恢復時呼叫。更多...
 
(void) - sessionManager:didResumeSession:
 成功恢復工作階段時呼叫。更多...
 
(void) - sessionManager:willResumeCastSession:
 在投放工作階段即將恢復時呼叫。更多...
 
(void) - sessionManager:didResumeCastSession:
 成功恢復投放工作階段時呼叫。更多...
 
(void) - sessionManager:session:didUpdateDevice:
 與此工作階段相關聯的裝置在某些方面發生變更 (例如好記名稱已變更) 時呼叫。更多...
 
(void) - sessionManager:session:didReceiveDeviceVolume:muted:
 收到工作階段的更新音量和靜音狀態時呼叫。更多...
 
(void) - sessionManager:castSession:didReceiveDeviceVolume:muted:
 接收到投放工作階段更新音量和靜音狀態時呼叫。更多...
 
(void) - sessionManager:session:didReceiveDeviceStatus:
 收到工作階段的更新裝置狀態時呼叫。更多...
 
(void) - sessionManager:castSession:didReceiveDeviceStatus:
 接收到投放工作階段的更新裝置狀態時呼叫。更多...
 
(void) - sessionManager:didUpdateDefaultSessionOptionsForDeviceCategory:
 針對特定裝置類別變更預設工作階段選項時呼叫此方法。更多...
 

方法詳細資料

- (void) sessionManager: (GCKSessionManager *)  sessionManager
willStartSession: (GCKSession *)  session 
optional

在工作階段即將開始時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didStartSession: (GCKSession *)  session 
optional

在工作階段成功啟動時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willStartCastSession: (GCKCastSession *)  session 
optional

在投放工作階段即將開始時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didStartCastSession: (GCKCastSession *)  session 
optional

在成功開始投放工作階段時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willEndSession: (GCKSession *)  session 
optional

當工作階段即將按要求或因錯誤而結束時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didEndSession: (GCKSession *)  session
withError: (nullable NSError *)  error 
optional

工作階段結束 (依要求或錯誤) 時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
errorThe error, if any; otherwise nil.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willEndCastSession: (GCKCastSession *)  session 
optional

當投放工作階段即將根據要求或發生錯誤時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didEndCastSession: (GCKCastSession *)  session
withError: (nullable NSError *)  error 
optional

投放工作階段結束時 (無論是要求或發生錯誤) 時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
errorThe error, if any; otherwise nil.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didFailToStartSession: (GCKSession *)  session
withError: (NSError *)  error 
optional

在工作階段無法開始時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
errorThe error.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didFailToStartCastSession: (GCKCastSession *)  session
withError: (NSError *)  error 
optional

投放工作階段無法開始時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
errorThe error.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didSuspendSession: (GCKSession *)  session
withReason: (GCKConnectionSuspendReason reason 
optional

在工作階段暫停時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
reasonThe reason for the suspension.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didSuspendCastSession: (GCKCastSession *)  session
withReason: (GCKConnectionSuspendReason reason 
optional

在投放工作階段暫停時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
reasonThe reason for the suspension.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willResumeSession: (GCKSession *)  session 
optional

在工作階段即將恢復時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didResumeSession: (GCKSession *)  session 
optional

成功恢復工作階段時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
willResumeCastSession: (GCKCastSession *)  session 
optional

在投放工作階段即將恢復時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didResumeCastSession: (GCKCastSession *)  session 
optional

成功恢復投放工作階段時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
session: (GCKSession *)  session
didUpdateDevice: (GCKDevice *)  device 
optional

與此工作階段相關聯的裝置在某些方面發生變更 (例如好記名稱已變更) 時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
deviceThe updated device object.
開始時間
3.2
- (void) sessionManager: (GCKSessionManager *)  sessionManager
session: (GCKSession *)  session
didReceiveDeviceVolume: (float)  volume
muted: (BOOL)  muted 
optional

收到工作階段的更新音量和靜音狀態時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
volumeThe current volume, in the range [0.0, 1.0].
mutedThe current mute state.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
castSession: (GCKCastSession *)  session
didReceiveDeviceVolume: (float)  volume
muted: (BOOL)  muted 
optional

接收到投放工作階段更新音量和靜音狀態時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
volumeThe current volume, in the range [0.0, 1.0].
mutedThe current mute state.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
session: (GCKSession *)  session
didReceiveDeviceStatus: (nullable NSString *)  statusText 
optional

收到工作階段的更新裝置狀態時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe session.
statusTextThe new device status text.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
castSession: (GCKCastSession *)  session
didReceiveDeviceStatus: (nullable NSString *)  statusText 
optional

接收到投放工作階段的更新裝置狀態時呼叫。

Parameters
sessionManagerThe session manager.
sessionThe Cast session.
statusTextThe new device status text.
- (void) sessionManager: (GCKSessionManager *)  sessionManager
didUpdateDefaultSessionOptionsForDeviceCategory: (NSString *)  category 
optional

針對特定裝置類別變更預設工作階段選項時呼叫此方法。

Parameters
sessionManagerThe session manager.
categoryThe device category.
開始時間
4.0