看到“Hype Machine”Sonos 应用程序的一个奇怪问题,其中 iOS 控制器不显示由 albumArtURI 提供的专辑封面。艺术品出现在 OS X 控制器上。
自定义浏览图标在此配置中工作,但这是一个不同的部分,当然。
地图:
<?xml version="1.0" encoding="utf-8" ?>
<Presentation>
<PresentationMap type="BrowseIconSizeMap">
<Match>
<browseIconSizeMap>
<sizeEntry size="0" substitution="_legacy.png"/>
<sizeEntry size="40" substitution="_40.svg"/>
<sizeEntry size="290" substitution="_290.svg"/>
</browseIconSizeMap>
</Match>
</PresentationMap>
<PresentationMap type="ArtWorkSizeMap">
<Match>
<!-- Default URL provided: http://static-ak.hypem.net/thumbs_new/e1/2207457_120.jpg -->
<imageSizeMap>
<sizeEntry size="50" substitution=".jpg"/>
<sizeEntry size="120" substitution="_120.jpg"/>
<sizeEntry size="320" substitution="_320.jpg"/>
</imageSizeMap>
</Match>
</PresentationMap>
<PresentationMap type="InfoView">
<Match>
<MenuItemOverrides>
<MenuItem FailureStringId="SAVE_TRACK_FAILURE" InProgressStringId="SAVE_TRACK_DURING" MenuItem="AddTrackToFavorites" StringId="SAVE_TRACK" SuccessStringId="SAVE_TRACK_SUCCESS"/>
<MenuItem FailureStringId="DELETE_TRACK_FAILURE" InProgressStringId="DELETE_TRACK_DURING" MenuItem="RemoveTrackFromFavorites" PromptStringId="DELETE_TRACK_PROMPT" StringId="DELETE_TRACK" SuccessStringId="DELETE_TRACK_SUCCESS"/>
</MenuItemOverrides>
</Match>
</PresentationMap>
<PresentationMap type="NowPlayingRatings" trackEnabled="true">
<Match propname="isFav" value="1">
<Ratings>
<Rating Id="0" AutoSkip="NEVER" OnSuccessStringId="UNFAV_SUCCESS" StringId="UNFAV">
<Icon Controller="icr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/on_52.png"/>
<Icon Controller="acr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/on_52.png"/>
<Icon Controller="acr-hdpi" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/on_80.png"/>
<Icon Controller="macdcr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/on_40.png"/>
<Icon Controller="pcdcr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/on_40.png"/>
<Icon Controller="cr200" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/on_66.png"/>
<Icon Controller="universal" LastModified="11:11:11 24 Mar 2014" Uri="http://sonos-img.ws.sonos.com/love-selected.svg"/>
</Rating>
</Ratings>
</Match>
<Match propname="isFav" value="0">
<Ratings>
<Rating Id="1" AutoSkip="NEVER" OnSuccessStringId="FAV_SUCCESS" StringId="FAV">
<Icon Controller="icr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/off_52.png"/>
<Icon Controller="acr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/off_52.png"/>
<Icon Controller="acr-hdpi" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/off_80.png"/>
<Icon Controller="macdcr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/off_40.png"/>
<Icon Controller="pcdcr" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/off_40.png"/>
<Icon Controller="cr200" LastModified="14:00:00 17 Dec 2012" Uri="http://hypem.com/images/sonos/off_66.png"/>
<Icon Controller="universal" LastModified="11:11:11 24 Mar 2014" Uri="http://sonos-img.ws.sonos.com/love-unselected.svg"/>
</Rating>
</Ratings>
</Match>
</PresentationMap>
<PresentationMap type="Search">
<Match>
<SearchCategories>
<Category id="artists" mappedId="SART" />
<Category id="tracks" mappedId="STRK" />
<CustomCategory mappedId="SBLG" stringId="Blogs" />
</SearchCategories>
</Match>
</PresentationMap>
</Presentation>
示例响应:
<ns1:mediaMetadata>
<ns1:id>TRACK:2crvj</ns1:id>
<ns1:itemType>track</ns1:itemType>
<ns1:title>Can I (Tez Cadey Remix)</ns1:title>
<ns1:mimeType>audio/mp3</ns1:mimeType>
<ns1:trackMetadata>
<ns1:artist>Alina Baraz & Galimatias</ns1:artist>
<ns1:duration>185</ns1:duration>
<ns1:albumArtURI>http://static.hypem.net/thumbs_new/71/2808433_120.jpg</ns1:albumArtURI>
<ns1:canPlay>true</ns1:canPlay>
<ns1:canSkip>true</ns1:canSkip>
</ns1:trackMetadata>
<ns1:dynamic>
<ns1:property>
<ns1:name>isFav</ns1:name>
<ns1:value>0</ns1:value>
</ns1:property>
</ns1:dynamic>
</ns1:mediaMetadata>
知道这个配置有什么不正确的吗?
谢谢你。
更新:对于那些好奇的人,这里可行的解决方案是提供与控制器要求完全匹配的 ArtWorkSizeMap 条目,即使随后的图像尺寸与广告尺寸不匹配。
此条目使图像开始显示:
<imageSizeMap>
<sizeEntry size="50" substitution=".jpg"/>
<sizeEntry size="80" substitution="_120.jpg"/>
<sizeEntry size="120" substitution="_120.jpg"/>
<sizeEntry size="180" substitution="_320.jpg"/>
<sizeEntry size="300" substitution="_320.jpg"/>
<sizeEntry size="600" substitution="_320.jpg"/>
<sizeEntry size="1000" substitution="_320.jpg"/>
<sizeEntry size="1500" substitution="_320.jpg"/>
</imageSizeMap>