<GCKMediaQueueDelegate> Протокол
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Протокол делегата для получения асинхронных уведомлений от GCKMediaQueue .
- С
- 4.3.4
Наследует <NSObjectNSObject>.
Вызывается, когда в очередь собираются внести одно или несколько изменений.
- Parameters
-
Вызывается, когда очередь полностью перезагружена.
Любые ранее использованные элементы очереди следует считать недействительными.
- Parameters
-
- (void) mediaQueue: |
|
( GCKMediaQueue *) |
queue |
didInsertItemsInRange: |
|
(NSRange) |
range |
|
|
| |
|
optional |
Вызывается, когда в очередь вставлен непрерывный диапазон элементов очереди.
- 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 |
Вызывается, когда в очереди обновляется один или несколько элементов очереди.
Это включает в себя случай, когда ранее доступные, но недоступные элементы были извлечены и помещены в кэш, а также случай, когда ранее кэшированные элементы были удалены из кэша.
- 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 |
Вызывается, когда один или несколько элементов очереди были удалены из очереди.
- Parameters
-
queue | The queue. |
indexes | The ordered list of indexes of the items that have been removed. |
Вызывается после внесения в очередь одного или нескольких изменений.
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-24 UTC.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-24 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,[]]