Skip to content

Commit 7692da2

Browse files
committed
docs: Update specbook
1 parent e246414 commit 7692da2

File tree

2 files changed

+197
-23
lines changed

2 files changed

+197
-23
lines changed

docs/specbook/src/mpris.md

Lines changed: 138 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ If CanPlay is false, attempting to call this method should have no effect.
160160

161161
#### Seek(x: Offset) -> nothing
162162

163-
##### Parameters
163+
#### Parameters
164164

165165
- **Offset - x (Time_In_Us)**
166166
The number of microseconds to seek forward.
@@ -255,32 +255,21 @@ Not all values may be accepted by the media player. It is left to media player i
255255

256256
#### Shuffle b Read/Write
257257

258+
> When this property changes, the org.freedesktop.DBus.Properties.PropertiesChanged signal is emitted with the new value.
258259
260+
A value of false indicates that playback is progressing linearly through a playlist, while true means playback is progressing through a playlist in some other order.
261+
262+
If CanControl is false, attempting to set this property should have no effect and raise an error.
259263

260264
#### Metadata a{sv} (Metadata_Map) Read only
261265

262-
- [x] `mpris:trackid` (D-Bus path): A unique identity for this track within the context of an MPRIS object (eg: tracklist).
263-
- [x] `mpris:length` (64-bit integer): The duration of the track in microseconds.
264-
- [x] `mpris:artUrl` (URI): The location of an image representing the track or album. Clients should not assume this will continue to exist when the media player stops giving out the URL.
265-
- [x] `xesam:album` (String): The album name.
266-
- [x] `xesam:albumArtist` (List of Strings): The album artist(s).
267-
- [x] `xesam:artist` (List of Strings): The track artist(s).
268-
- [x] `xesam:asText` (String): The track lyrics.
269-
- [x] `xesam:audioBPM` (Integer): The speed of the music, in beats per minute.
270-
- [x] `xesam:autoRating` (Float): An automatically-generated rating, based on things such as how often it has been played. This should be in the range 0.0 to 1.0.
271-
- [x] `xesam:comment` (List of Strings): A (list of) freeform comment(s).
272-
- [x] `xesam:composer` (List of Strings): The composer(s) of the track.
273-
- [ ] `xesam:contentCreated` (Date/Time): When the track was created. Usually only the year component will be useful.
274-
- [x] `xesam:discNumber` (Integer): The disc number on the album that this track is from.
275-
- [ ] `xesam:firstUsed` (Date/Time): When the track was first played.
276-
- [x] `xesam:genre` (List of Strings): The genre(s) of the track.
277-
- [ ] `xesam:lastUsed` (Date/Time): When the track was last played.
278-
- [x] `xesam:lyricist` (List of Strings): The lyricist(s) of the track.
279-
- [x] `xesam:title` (String): The track title.
280-
- [x] `xesam:trackNumber` (Integer): The track number on the album disc.
281-
- [x] `xesam:url` (URI): The location of the media file.
282-
- [x] `xesam:useCount` (Integer): The number of times the track has been played.
283-
- [x] `xesam:userRating` (Float): A user-specified rating. This should be in the range 0.0 to 1.0.
266+
> When this property changes, the org.freedesktop.DBus.Properties.PropertiesChanged signal is emitted with the new value.
267+
268+
The metadata of the current element.
269+
270+
If there is a current track, this must have a "mpris:trackid" entry (of D-Bus type "o") at the very least, which contains a D-Bus path that uniquely identifies this track.
271+
272+
See the type documentation for more details.
284273

285274
#### Volume d (Volume) Read/Write
286275

@@ -376,10 +365,136 @@ This property is not expected to change, as it describes an intrinsic capability
376365

377366
If this is false, clients should assume that all properties on this interface are read-only (and will raise errors if writing to them is attempted), no methods are implemented and all other properties starting with "Can" are also false.
378367

368+
## Metadata
369+
370+
### Type/format
371+
372+
A mapping from metadata attribute names to values.
373+
374+
The mpris:trackid attribute must always be present, and must be of D-Bus type "o". This contains a D-Bus path that uniquely identifies the track within the scope of the playlist. There may or may not be an actual D-Bus object at that path; this specification says nothing about what interfaces such an object may implement.
375+
376+
If the length of the track is known, it should be provided in the metadata property with the "mpris:length" key. The length must be given in microseconds, and be represented as a signed 64-bit integer.
377+
378+
If there is an image associated with the track, a URL for it may be provided using the "mpris:artUrl" key. For other metadata, fields defined by the Xesam ontology should be used, prefixed by "xesam:". See the metadata page on the freedesktop.org wiki for a list of common fields.
379+
380+
Lists of strings should be passed using the array-of-string ("as") D-Bus type. Dates should be passed as strings using the ISO 8601 extended format (eg: 2007-04-29T14:35:51). If the timezone is known, RFC 3339's internet profile should be used (eg: 2007-04-29T14:35:51+02:00).
381+
382+
### Types
383+
384+
#### List of Strings
385+
386+
Note that some types that you might expect to be strings are, in fact, "lists of strings". These should be sent using the "as" D-Bus type (array of string).
387+
388+
#### Date/Time
389+
390+
Date/time fields should be sent as strings in ISO 8601 extended format. If the timezone is known (eg: for xesam:lastPlayed), the internet profile format of ISO 8601, as specified in RFC 3339, should be used.
391+
392+
For example: "2007-04-29T13:56+01:00" for 29th April 2007, four minutes to 2pm, in a time zone 1 hour ahead of UTC.
393+
394+
#### URI
395+
396+
URIs should be sent as (UTF-8) strings. Local files should use the "file://" schema.
397+
398+
### Fields (MPRIS-specific)
399+
400+
#### mpris:trackid
401+
402+
D-Bus path: A unique identity for this track within the context of an MPRIS object (eg: tracklist).
403+
404+
#### mpris:length
405+
406+
64-bit integer: The duration of the track in microseconds.
407+
408+
#### mpris:artUrl
409+
410+
URI: The location of an image representing the track or album. Clients should not assume this will continue to exist when the media player stops giving out the URL.
411+
412+
### Common Xesam properties
413+
414+
Common audio properties from the Xesam specification:
415+
416+
#### xesam:album
417+
418+
String: The album name.
419+
420+
#### xesam:albumArtist
421+
422+
List of Strings: The album artist(s).
423+
424+
#### xesam:artist
425+
426+
List of Strings: The track artist(s).
427+
428+
#### xesam:asText
429+
430+
String: The track lyrics.
431+
432+
#### xesam:audioBPM
433+
434+
Integer: The speed of the music, in beats per minute.
435+
436+
#### xesam:autoRating
437+
438+
Float: An automatically-generated rating, based on things such as how often it has been played. This should be in the range 0.0 to 1.0.
439+
440+
#### xesam:comment
441+
442+
List of Strings: A (list of) freeform comment(s).
443+
444+
#### xesam:composer
445+
446+
List of Strings: The composer(s) of the track.
447+
448+
#### xesam:contentCreated
449+
450+
Date/Time: When the track was created. Usually only the year component will be useful.
451+
452+
#### xesam:discNumber
453+
454+
Integer: The disc number on the album that this track is from.
455+
456+
#### xesam:firstUsed
457+
458+
Date/Time: When the track was first played.
459+
460+
#### xesam:genre
461+
462+
List of Strings: The genre(s) of the track.
463+
464+
#### xesam:lastUsed
465+
466+
Date/Time: When the track was last played.
467+
468+
#### xesam:lyricist
469+
470+
List of Strings: The lyricist(s) of the track.
471+
472+
#### xesam:title
473+
474+
String: The track title.
475+
476+
#### xesam:trackNumber
477+
478+
Integer: The track number on the album disc.
479+
480+
#### xesam:url
481+
482+
URI: The location of the media file.
483+
484+
#### xesam:useCount
485+
486+
Integer: The number of times the track has been played.
487+
488+
#### xesam:userRating
489+
490+
Float: A user-specified rating. This should be in the range 0.0 to 1.0.
491+
492+
379493
## org.mpris.MediaPlayer2.TrackList
380494

381495
TODO.
382496

383497
## org.mpris.MediaPlayer2.Playlists
384498

385499
TODO.
500+

docs/specbook/src/windows.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,62 @@ Gets or sets a value representing the start time of the currently playing media
230230
- **Low (1):** The sound level is low.
231231
- **Full (2):** The sound level is at full volume.
232232

233+
## ImageDisplayProperties
234+
235+
### Properties
236+
237+
#### Subtitle
238+
239+
Gets or sets the subtitle of the image.
240+
241+
#### Title
242+
243+
Gets or sets the title of the image.
244+
245+
## MusicDisplayProperties
246+
247+
### Properties
248+
249+
#### AlbumArtist
250+
251+
Gets or sets the name of the album artist.
252+
253+
#### AlbumTitle
254+
255+
Gets or sets the album title.
256+
257+
#### AlbumTrackCount
258+
259+
Gets or sets the album track count.
260+
261+
#### Artist
262+
263+
Gets or set the name of the song artist.
264+
265+
#### Genres
266+
267+
Gets a modifiable list of strings representing genre names.
268+
269+
#### Title
270+
271+
Gets or set the title of the song.
272+
273+
#### TrackNumber
274+
275+
Gets or sets the track number.
276+
277+
## VideoDisplayProperties
278+
279+
### Properties
280+
281+
#### Genres
282+
283+
Gets a modifiable list of strings representing genre names.
284+
285+
#### Subtitle
286+
287+
Gets or sets the subtitle of the video.
288+
289+
#### Title
290+
291+
Gets or sets the title of the video.

0 commit comments

Comments
 (0)