3. PARTE ESPECÍFICA
3.1 CAPITULO 1
3.1.3 Organización y estructura
Additionally, the accessory must not request a full database update using the“26.10.4
StartMediaLibraryUpdates” (page 204) message more than once during an iAP2 connection. The accessory must be capable of processing incremental media library updates from the device and persist its media library mirror across connections to minimize the occurrence of full updates.
All accessories that support the Media Library Updates feature must send or receive the following iAP2 control session messages:
“26.10.4 StartMediaLibraryUpdates” (page 204)
“26.10.5 MediaLibraryUpdate” (page 206)
“26.10.6 StopMediaLibraryUpdates” (page 209)
16.1.3 Media Library Playback Requirements
All accessories making use of Media Library Playback must support Media Library Updates.
All accessories that support the Media Library Playback feature may also send or receive the following iAP2 control session messages:
“26.10.7 PlayMediaLibraryCurrentSelection” (page 209)
“26.10.8 PlayMediaLibraryItems” (page 209)
“26.10.9 PlayMediaLibraryCollection” (page 210)
“26.10.7 PlayMediaLibraryCurrentSelection” (page 209) must only be sent by the accessory in response to a direct user action, such as pressing a button on the accessory labeled 'iPod' or 'iPhone'. Similarly,“26.10.8 PlayMediaLibraryItems” (page 209) and“26.10.9 PlayMediaLibraryCollection” (page 210) must only be sent by the accessory in response to a direct user action such as selecting a specific group of media items, or a media collection, and pressing a 'Play' or 'Select' button on the accessory.
Note: Accessories must not send Media Library Playback messages in response to any direct user actions that map to Media Remote Control HID usages (see“14.1.4 HID Media Playback Remote Requirements” (page 98)). For example, if an accessory has a 'Next Track' button, the accessory must generate a 'Next Track' HID usage when that button is pressed, not a“26.10.8
PlayMediaLibraryItems” (page 209)message.
Autonomous generation of these messages without being preceded by direct user action is grounds for failure to pass self certification. If an accessory wishes to resume media playback upon initial connection to the Apple
16. Media Library Access
16.1 Media Library Access Requirements
16.2 Media Library Access Usage
16.2.1 Media Library Information Usage
Accessories must send“26.10.1 StartMediaLibraryInformation” (page 203) to start receiving“26.10.2
MediaLibraryInformation” (page 203) messages. Each“26.10.2 MediaLibraryInformation” (page 203) message contains information about all available media libraries on the Apple device. TheMediaLibraryNamefor each library may be used to populate the accessory display, and the accessory must use the assigned
MediaLibraryUniqueIdentifierif it wants to receive updates or request playback for that media library.
The accessory must send“26.10.3 StopMediaLibraryInformation” (page 204) when it stops displaying or making use of media library information. For example, if an accessory supports multiple audio sources, including an Apple device, the accessory must stop receiving media library information from the Apple device if the user takes action to switch to another audio source.
16.2.2 Media Library Updates Usage
To make use of media library updates, accessories must send a“26.10.4 StartMediaLibraryUpdates” (page 204) message enumerating the media item and/or media playlist properties that they are interested in for a particular media library.“26.10.5 MediaLibraryUpdate” (page 206) messages will be sent by the device when the contents of the active media library change relative to the last database version sent to the accessory. Updates will be sent only for properties for which the accessory specifically requested updates.
Accessories must be prepared to receive duplicate“26.10.5 MediaLibraryUpdate” (page 206) messages. In such situations, the accessory does not need to apply the duplicate update. Additionally, non-actionable update messages, such as a message that instructs the accessory to delete a media item that is not present in the accessory's media library, must be ignored by the accessory. Other actions taken by the user, other devices owned by the user, or other accessories may result in those situations; the accessory must not treat them as error states.
Accessories that register for media item and/or media playlist property updates via the“26.10.4
StartMediaLibraryUpdates” (page 204) message must process media item and/or media playlist deletions when present in received“26.10.5 MediaLibraryUpdate” (page 206) messages. Such deletions must be processed immediately and reflected in any user-visible displays. Accessory selection of a deleted media item or media playlist for playback after notice of the deletion has been received is grounds for failure to pass self certification.
The accessory must send“26.10.6 StopMediaLibraryUpdates” (page 209) when it stops displaying or making use of media library updates. For example, if an accessory supports multiple audio sources, including an Apple device, the accessory must stop receiving media library updates from the Apple device if the user takes action to switch to another audio source.
16. Media Library Access 16.2 Media Library Access Usage
Regardless of whether the accessory sends“26.10.6 StopMediaLibraryUpdates” (page 209) or disconnects from the Apple device, the accessory must store the last receivedMediaLibraryRevisionparameter value. When the accessory next sends“26.10.4 StartMediaLibraryUpdates” (page 204) to the same Apple device it must set LastKnownMediaLibraryRevisionto that value to avoid having to retrieve a complete media library update. If the accessory has limited storage capacity it may choose to only retain a media library snapshot from one Apple device at a time.
16.2.3 Media Library Playback Usage
Accessories may make use of Media Library Playback to either play a media library item collection (such as a playlist) or even an arbitrary set of media items that has been assembled by the accessory. Every media item in that set must be obtained from Media Library Updates.
To resume playback of a library's current selection, the accessory must send“26.10.7 PlayMediaLibraryCurrentSelection” (page 209).
To start playback of specific media items or a media library collection, the accessory must send“26.10.8 PlayMediaLibraryItems” (page 209) or“26.10.9 PlayMediaLibraryCollection” (page 210), respectively. The library's current selection will be replaced with the new items or collection contents.
Additionally, accessories that request playback of media items must not anticipate or assume corresponding state changes by the Apple device. For further explanation, see“2.7 Presentation of Apple Device Updates” (page 26).
16. Media Library Access 16.2 Media Library Access Usage
Starting with iOS 4.2.1, some Apple devices provide support for USB Host Mode MIDI. Compatible accessories can interface directly with iOS apps that make use of the Core MIDI framework.
To support MIDI, accessories must follow the requirements in Universal Serial Bus Definition for MIDI Devices , Release 1.0, available at www.usb.org. Developers should test their accessory designs against the latest Mac OS X MIDI driver; the application Audio MIDI Setup, in the Mac OS X Applications/Utilities folder, can be used to verify accessory compatibility.
Every accessory that supports the USB Host Mode MIDI must implement a MIDI Streaming IN endpoint.