Protokół <GCKMediaQueueQueue> Protokół
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Protokół przekazywania dostępu do odbierania powiadomień asynchronicznych z urządzenia GCKMediaQueue.
- Od
- 4.3.4
Dziedziczy <NSObjectNSObject>.
Wywoływana, gdy w kolejce ma zostać wprowadzona co najmniej jedna zmiana.
- Parameters
-
Wywoływana po całkowitym odświeżeniu kolejki.
Wszystkie elementy kolejki, do których uzyskano dostęp, powinny zostać uznane za nieprawidłowe.
- Parameters
-
- (void) mediaQueue: |
|
(GCKMediaQueue *) |
queue |
didInsertItemsInRange: |
|
(NSRange) |
range |
|
|
| |
|
optional |
Wywoływana po wstawieniu do kolejki ciągłego zakresu elementów kolejki.
- Parameters
-
queue | The queue. |
range | The range indicating the starting index and count of items inserted. |
- (void) mediaQueue: |
|
(GCKMediaQueue *) |
queue |
didUpdateItemsAtIndexes: |
|
(NSArray< NSNumber * > *) |
indexes |
|
|
| |
|
optional |
Wywoływana po zaktualizowaniu co najmniej jednego elementu w kolejce.
Obejmuje to przypadki, w których elementy, do których wcześniej uzyskano dostęp, ale niedostępne, zostały pobrane i umieszczone w pamięci podręcznej, oraz przypadki, w których elementy wcześniej zapisane w pamięci podręcznej zostały usunięte z pamięci podręcznej.
- Parameters
-
queue | The queue. |
indexes | The ordered list of indexes of the items that have been updated. |
- (void) mediaQueue: |
|
(GCKMediaQueue *) |
queue |
didRemoveItemsAtIndexes: |
|
(NSArray< NSNumber * > *) |
indexes |
|
|
| |
|
optional |
Wywoływane po usunięciu z kolejki co najmniej jednego elementu.
- Parameters
-
queue | The queue. |
indexes | The ordered list of indexes of the items that have been removed. |
Wywoływana po wprowadzeniu w kolejce co najmniej 1 zmiany.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGCKMediaQueueDelegate\u003c/code\u003e protocol enables receiving asynchronous notifications from a \u003ccode\u003eGCKMediaQueue\u003c/code\u003e, informing about changes like insertions, removals, and updates.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to handle queue changes, including \u003ccode\u003emediaQueueWillChange:\u003c/code\u003e, \u003ccode\u003emediaQueueDidReloadItems:\u003c/code\u003e, \u003ccode\u003emediaQueue:didInsertItemsInRange:\u003c/code\u003e, \u003ccode\u003emediaQueue:didUpdateItemsAtIndexes:\u003c/code\u003e, \u003ccode\u003emediaQueue:didRemoveItemsAtIndexes:\u003c/code\u003e, and \u003ccode\u003emediaQueueDidChange:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThese methods are optional and offer insights into queue modifications, such as when items are added, updated, or removed, or when the entire queue is reloaded.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can implement these methods to respond to queue events and update their application's state accordingly, ensuring synchronization with the media queue.\u003c/p\u003e\n"]]],["The `GCKMediaQueueDelegate` protocol provides methods for asynchronous notifications about changes to a media queue. Key actions include: notifying when changes are imminent (`mediaQueueWillChange:`), when the queue is reloaded (`mediaQueueDidReloadItems:`), when items are inserted (`mediaQueue:didInsertItemsInRange:`), updated (`mediaQueue:didUpdateItemsAtIndexes:`), or removed (`mediaQueue:didRemoveItemsAtIndexes:`), and when changes are completed (`mediaQueueDidChange:`). Each method provides the affected queue and relevant details like ranges or indexes.\n"],null,[]]