Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Update of "XDND types"

Overview

Artifact ID: 31c60c9ce145a5cc98d9c088f0762d583fe7ac8f
Page Name:XDND types
Date: 2015-04-27 22:57:55
Original User: mario
Mimetype:text/x-markdown
Parent: a03b51e56c7331ddc706deeb84314d3c27b3fe9c (diff)
Content

There's drag and drop support in streamtuner2 since 2.1.7, primarily meant for exporting individual stations into .XSPF or .PLS files, or dragging them into audio players.

There is also support for proper XDND payloads. However most BSD/Linux desktop applications support little more than STRING or text/uri-list file dragging. There's no standardization in or beyond that. Which is because nobody bothers to document anything. So as exception to the rule:

drag target MIME type info id content / payload actions
audio/x-mpegurl 20 #EXTM3U
#EXTINF;-1,Title
http://example.org/stream.mp3
…
DEFAULT+COPY
application/x-scpls 21 [Playlist]
File1=http://example.org/stream.mp3
Title1=Radio
…
DEFAULT+COPY
application/xspf+xml 22 <playlist xmlns=…>
<track><title>Radio</title>
<location>http://example.org/stream.mp3</location>
…
DEFAULT+COPY
application/smil
text/html
23 <seq>
<audio src="http://example.org/stream.mp3">
…
DEFAULT+COPY
application/jspf+json 25 { "playlist": {
"track":{
"location": "http://example.org/stream.mp3"
…
DEFAULT+COPY
application/x-desktop 26 [Desktop Entry]
Type=Link
URL=http://example.org/stream.mp3
Title=Radio
…
DEFAULT+COPY
text/url
message/external-body
27 [InternetShortcut]
URL=http://example.org/stream.mp3
DEFAULT+COPY
url/direct
text/iri-list
15 http://example.org/stream.mp3 DEFAULT+COPY
FILE_NAME 3 /tmp/streamtuner2/RadioStation.pls DEFAULT+COPY
text/uri-list 4 file:///tmp/streamtuner2/RadioStation.xspf DEFAULT+COPY
TEXT
STRING
UTF8_STRING
text/plain
5 http://example.org:8309/listen.pls
# Title: Radio
# Description: Current song etc..
DEFAULT+COPY
json/vnd.streamtuner2.station
(internal JSON format)
51 [
 {
  "url": "http://example.org:8429/.ogg",
  "title": "Radio station name"
 },
…
SAMEAPP+ACTIONMOVE

<style> .content table td { border-bottom: 3px dashed #ddd; } .content table td { font-size: 80%; } </style>

  • The example payloads are abstracted here.
  • The info ids are just Gtk-internal.
  • Ordering doesn't reflect priority handling.

As said, only text/uri-list is used in practice. It doesn't allow actual streaming URLs being transferred. Instead streamtuner2 has to create temporary export files. And since this dumb approach doesn't allow any content-negotation, a preconfigured default playlist format will be used for temp files. (Defaults to XSPF for crashing Rhythmbox.)

Alternatively there's text/iri-list now (yes, why not go with the century?) and url/direct to get a direct streaming URL/IRL.