I'm working on a music software and I would like to use the XSPF specifications since its a standard, but there is something I don't get.
Or maybe it doesn't even exists, since the last update of the specs are... 14 years old.
For tracks, they have the location tag to set the source file of a song.
<track>
<location>http://example.com/song_1.mp3</location>
</track>
But what if, with my code, I don't know the URL of a source file, but instead I know the links to one or several music services that could stream that track (spotify/soundcloud/...), depending of what the user is able to play ?
Can I, and how can I declare one or several links of that track on music services, in my XSPF ?
eg for a same track:
https://geo.music.apple.com/be/album/_/1444279072?i=1444279073&mt=1&app=music&at=1000lHKX
https://open.spotify.com/track/6XBaTMiZa77Du2XEl1RNaa
https://www.deezer.com/track/66644816
https://music.amazon.com/albums/B082QWLFM7?trackAsin=B082QMC1C9&do=play
https://www.youtube.com/watch?v=PA3P1-aSvKQ
https://www.youtube.com/watch?v=vUes9-tFWm4
Maybe it as simple as declaring several location tags ?
URI of resource to be rendered. Probably an audio resource, but MAY be any type of resource with a well-known duration, such as video, a SMIL document, or an XSPF document. The duration of the resource defined in this element defines the duration of rendering. xspf:track elements MAY contain zero or more location elements, but a user-agent MUST NOT render more than one of the named resources.
<track>
<location>https://geo.music.apple.com/be/album/_/1444279072?i=1444279073&mt=1&app=music&at=1000lHKX</location>
<location>https://open.spotify.com/track/6XBaTMiZa77Du2XEl1RNaa</location>
<location>https://www.deezer.com/track/66644816</location>
<location>https://music.amazon.com/albums/B082QWLFM7?trackAsin=B082QMC1C9&do=play</location>
<location>https://www.youtube.com/watch?v=PA3P1-aSvKQ</location>
</track>
Or should it be done using the identifier tag ?
Canonical ID for this resource. Likely to be a hash or other location-independent name, such as a MusicBrainz identifier. MUST be a legal URI. xspf:track elements MAY contain zero or more identifier elements.
For example, the URI http://musicbrainz.org/track/7e1d6f5f-0ac3-4889-8b57-506a67b459fc.html is an identifier for a specific song, but dereferencing that identifier will not yield a copy of the song.
Or using the link tag - which was my first idea but I'm less and less sure it has been designed for this ?
The link element allows XSPF to be extended without the use of XML namespaces. xspf:track elements MAY contain zero or more link elements.
The documentation is not really obvious about that.
Can anyone help ?
Thanks !