From OpenHome
Contents |
Architectural Overview
The Radio service provides the means for controlling a Radio source. If a product's Product Service reports a source of type 'Radio', then the device that bears that Product Service is guaranteed to also bear the Radio service.
The heart of the Radio service is the SetChannel action. Call SetChannel with a particular Uri and Metadata, then call Play and the media at the given Uri is played. If the media is an internet radio stream, it will play forever. If it is of finite length, it will play to the end and then stop.
Call the Channel action to report the Uri and Metadata of the current Channel.
The Radio Source also stores a list of channel presets. These can be presented to the user as a list of numbered channels that can easily be selected and played.
This array of channel presets is accessed using an id array mechanism similar to that used in the Playlist Service. The only difference is that the Radio service's id array is a constant length and may contain entries that are zero, which represent empty presets.
Actions
Channel
Report the Uri and Metadata of the current Channel.
SetChannel
Set the Uri and Metadata of the current Channel.
IdArray
Report the current id array. The id array contains 100 presets, but this may change (see ChannelsMax).
The IdArray is an ordered, constant length, array of ids. The first element contains the id for channel preset 1, the second element contains the id for channel Preset 2, etc. If an element is set to zero, then the corresponding channel preset is empty.
This action also reports a Token, which can be used to quickly detect if the id array has changed since it was last read (see IdArrayChanged).
IdArrayChanged
Check to see if the id array has changed since gathering the specified IdArrayToken. This Token must have been previously collected from the IdArray action.
This mechanism is provided specifically for clients unable to partake in UPnP eventing.
ChannelsMax
Report the maximum number of entries in the channel preset id array.
SetId
The the current Channel using the channel preset represented by the given Id, and using the provided Uri.
It is usual for a Control Point to inspect the res elements of the Channel Metadata and select the appropriate Uri by matching to the renderer's ProtocolInfo.
Id
Report the Id of the current Channel if it is in the Channel Preset list. If the current Channel is not a channel preset, the Id reported is zero.
ProtocolInfo
Report the Radio Source protocol info.
Read
Given a channel preset Id, report its associated Metadata.
ReadList
Given a space separated list of channel preset Ids, report their associated Metadata.
TransportState
Report the current transport state, which can be: 'Playing', 'Paused', 'Stopped', or 'Buffering'.
Play
Play the current channel
Pause
Pause the current channel. This will be converted to Stop if the channel cannot be paused e.g. internet radio.
Stop
Stop the current Channel
SeekSecondsAbsolute
Seek to an absolute second within the current media. This is only available if the current media has a finite length.
SeekSecondsRelative
Seek to a relative second within the current media. This is only available if the current media has a finite length.
Technical Details
Domain : av.openhome.org Name : Radio Version : 1