بروتوكول <GCKSessionManagerListener>
بروتوكول المستمع GCKSessionManager
وجميع طرق البروتوكول اختيارية. تتوفّر جميع طرق الإشعارات في نوعَين: أحدهما يتم استدعاؤه لأي نوع جلسة، والآخر يتم استدعاؤه خصيصًا لجلسات البث.
يتم استدعاء المستمعين بالترتيب الذي تم تسجيلهم به. سيتم دائمًا استدعاء GCKSessionManagerListener من مثيلات إطار العمل نفسه (مثل GCKUIMediaController) بعد الحالات التي تم تسجيلها من خلال التطبيق لرد الاتصال sessionManager:willStartSession: (GCKSessionManagerListener-p) وsessionManager:willStartCastSession: (GCKSessionManagerListener-p) وsessionManager:willResumeSession: (GCKSessionManagerListener-p) وsessionManager:willResumeCastSession: (GCKSessionManagerListener-p)، وقبل تلك التي تم تسجيلها من خلال التطبيق لجميع عمليات معاودة الاتصال المتبقية.
- منذ
- 3.0
يكتسب <NSObjectNSObject>.
يتم استدعاؤه عندما توشك الجلسة على البدء.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
يتم استدعاؤه عند بدء إحدى الجلسات بنجاح.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
يتم الاتصال عندما تكون جلسة البث على وشك البدء.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
يتم استدعاء هذا الإجراء عند بدء جلسة البث بنجاح.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
يتم استدعاء هذا الإجراء عندما توشك الجلسة على الانتهاء، سواء بناءً على طلب أو بسبب خطأ.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
didEndSession: |
|
(GCKSession *) |
session |
withError: |
|
(nullable NSError *) |
error |
|
|
| |
|
optional |
يتم استدعاءه عند انتهاء إحدى الجلسات، إما عن طريق طلب أو نتيجة لخطأ.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
error | The error, if any; otherwise nil. |
يتم استدعاء هذه الطريقة عندما توشك جلسة البث على الانتهاء، سواء بناءً على طلب أو بسبب خطأ.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
يتم استدعاء هذا الحدث عند انتهاء جلسة البث، إما بطلب أو بسبب خطأ.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
error | The error, if any; otherwise nil. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
didFailToStartSession: |
|
(GCKSession *) |
session |
withError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
يتم استدعاء هذا الإجراء عند تعذّر بدء الجلسة.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
error | The error. |
يتم استدعاء الإجراء عند تعذّر بدء جلسة البث.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
error | The error. |
يتم الاتصال به عند تعليق إحدى الجلسات.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
reason | The reason for the suspension. |
يتم الاتصال به عند تعليق جلسة البث.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
reason | The reason for the suspension. |
يتم استدعاؤه عندما يكون على وشك استئناف الجلسة.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
يتم استدعاؤه عند استئناف الجلسة بنجاح.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
يتم استدعاء هذا الإجراء عندما يكون على وشك استئناف جلسة البث.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
يتم استدعاء هذا الإجراء عند استئناف جلسة البث بنجاح.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
يتم استدعاء هذا الإجراء عند تغيير الجهاز المرتبط بهذه الجلسة بطريقة ما (على سبيل المثال، تم تغيير الاسم المألوف).
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
device | The updated device object. |
- منذ
- 3.2
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
session: |
|
(GCKSession *) |
session |
didReceiveDeviceVolume: |
|
(float) |
volume |
muted: |
|
(BOOL) |
muted |
|
|
| |
|
optional |
يتم الاتصال عندما يتم تلقّي مستوى صوت الجهاز الجديد وحالة كتم الصوت لجلسة معيَّنة.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
volume | The current volume, in the range [0.0, 1.0]. |
muted | The current mute state. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
castSession: |
|
(GCKCastSession *) |
session |
didReceiveDeviceVolume: |
|
(float) |
volume |
muted: |
|
(BOOL) |
muted |
|
|
| |
|
optional |
يتم الاتصال به عند استلام مستوى صوت الجهاز المُحدَّث وحالة كتم الصوت لجلسة البث.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
volume | The current volume, in the range [0.0, 1.0]. |
muted | The current mute state. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
session: |
|
(GCKSession *) |
session |
didReceiveDeviceStatus: |
|
(nullable NSString *) |
statusText |
|
|
| |
|
optional |
يتم الاتصال به عند تلقّي حالة الجهاز المعدَّلة لجلسة معيَّنة.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
statusText | The new device status text. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
castSession: |
|
(GCKCastSession *) |
session |
didReceiveDeviceStatus: |
|
(nullable NSString *) |
statusText |
|
|
| |
|
optional |
يتم الاتصال به عند تلقّي حالة الجهاز المعدَّلة لجلسة بث.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
statusText | The new device status text. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
didUpdateDefaultSessionOptionsForDeviceCategory: |
|
(NSString *) |
category |
|
|
| |
|
optional |
يتم استدعاء هذا الحدث عند تغيير خيارات الجلسة التلقائية لفئة جهاز معيّنة.
- Parameters
-
sessionManager | The session manager. |
category | The device category. |
- منذ
- 4.0
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2023-12-02 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2023-12-02 (حسب التوقيت العالمي المتفَّق عليه)"],[[["`GCKSessionManagerListener` protocol provides methods to monitor the lifecycle and status of Cast sessions, including start, end, suspension, and resumption."],["Listeners are notified about changes in session state through methods like `sessionManager:didStartSession:` and `sessionManager:didEndSession:withError:`."],["The protocol also includes methods to track device updates, such as volume changes (`sessionManager:session:didReceiveDeviceVolume:muted:`) and status updates (`sessionManager:session:didReceiveDeviceStatus:`)."],["Framework-registered listeners have priority for certain callbacks, specifically those related to session start and resumption."],["These optional methods are invoked in the order the listeners were registered, enabling developers to react to various session and device events."]]],[]]