|
YAACC - UPNP Client and Server
|
The one place that answers "can this item be played as audio by a player that reads and decodes on this phone" (11.11) and "is it a picture or a video" (11.2, the receiver picker). More...

Static Public Member Functions | |
| static boolean | isPlaylistFile (String mimeType, String resourceUrl, String title) |
| static boolean | isPlaylistFile (PlayableItem item) |
As isPlaylistFile(String, String, String) for an item of a queue. | |
| static List< PlayableItem > | audioOnly (List< PlayableItem > items) |
The audio items of a queue, in the same order (a new list, never null): what a player that plays music only (a Snapcast group, a Sendspin player) takes from a folder that holds more than music, such as the covers of the albums (folder.jpg) beside the songs. | |
| static List< PlayableItem > | withoutPlaylistFiles (List< PlayableItem > items) |
| The items that can be played as audio: the list without its playlist files, in the same order (a new list, never null). | |
| static boolean | isImageOrVideo (String mimeType) |
| True for a type that says image or video (the receivers that play music only can not take it). | |
The one place that answers "can this item be played as audio by a player that reads and decodes on this phone" (11.11) and "is it a picture or a video" (11.2, the receiver picker).
Pure: strings in, booleans out; the callers only ask.
Playlist files (.m3u, .pls, .asx; types audio/x-mpegurl, audio/mpegurl, audio/x-scpls, audio/x-ms-asx) are listed by servers as audio items but are lists of other files; ExoPlayer fails on them with ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED. They are matched by type (compared without case, a ; parameter is ignored) and by the extension of the resource address or of the title. HLS stays playable: the types application/vnd.apple.mpegurl and application/x-mpegURL and an address that ends in .m3u8 (query and fragment ignored), or a title that ends in .m3u8, are never playlist files, even when a server announces such a stream with the generic playlist type. The extension of the address decides; the title is only looked at when the address has no extension (a title such as "Dance. M3U" does not drop a track whose address ends in .flac).
|
static |
The audio items of a queue, in the same order (a new list, never null): what a player that plays music only (a Snapcast group, a Sendspin player) takes from a folder that holds more than music, such as the covers of the albums (folder.jpg) beside the songs.
An item whose type is not known is not taken.
Referenced by de.yaacc.player.PlayerService.createPlayerFor().

|
static |
| mimeType | the type of the resource, may be null |
| resourceUrl | the address of the resource, may be null (never logged by this class) |
| title | the title of the item, may be null |
Referenced by de.yaacc.player.PlayableCheck.isPlaylistFile(), and de.yaacc.player.PlayableCheck.withoutPlaylistFiles().
