9.2
6 AVTransport
| (require racket-upnp/services/av-transport) | package: base |
AVTransport controls the playback state of a MediaRenderer. The media itself is normally fetched by the renderer from the URI supplied by the control point.
procedure
(device-av-transport device) → (or/c #f upnp-service?)
device : upnp-device?
Returns the device’s AVTransport service.
Recognises an AVTransport service.
procedure
(av-transport-set-uri! transport uri [ #:metadata metadata #:instance-id instance-id]) → void? transport : av-transport? uri : string? metadata : string? = "" instance-id : exact-nonnegative-integer? = 0
Sets the current transport URI and optional DIDL-Lite metadata.
procedure
(av-transport-play! transport [ #:speed speed #:instance-id instance-id]) → void? transport : av-transport? speed : any/c = 1 instance-id : exact-nonnegative-integer? = 0
Starts playback.
procedure
(av-transport-pause! transport [ #:instance-id instance-id]) → void? transport : av-transport? instance-id : exact-nonnegative-integer? = 0
Pauses playback.
procedure
(av-transport-stop! transport [ #:instance-id instance-id]) → void? transport : av-transport? instance-id : exact-nonnegative-integer? = 0
Stops playback.
procedure
(av-transport-seek! transport seconds [ #:instance-id instance-id]) → void? transport : av-transport? seconds : nonnegative-real? instance-id : exact-nonnegative-integer? = 0
Seeks using the UPnP REL_TIME unit.
procedure
(av-transport-status transport [ #:instance-id instance-id]) → symbol? transport : av-transport? instance-id : exact-nonnegative-integer? = 0
Returns a state such as 'playing, 'paused, 'stopped, or 'unknown.
procedure
(av-transport-position transport [ #:instance-id instance-id]) → transport-position? transport : av-transport? instance-id : exact-nonnegative-integer? = 0
Returns the current track, position, duration, and URI.
6.1 Position values
Recognises an AVTransport position value.
procedure
(transport-position-track position) → (or/c #f exact-integer?)
position : transport-position?
Returns the current track number.
procedure
→ (or/c #f nonnegative-real?) position : transport-position?
Returns the current relative position in seconds.
procedure
→ (or/c #f nonnegative-real?) position : transport-position?
Returns the track duration in seconds.
Returns the current track URI.