PlayPauseButton Class Reference
Inherits from | UIButton |
---|---|
Declared in | PlayPauseButton.h |
Overview
Button that automatically updates its selected
property to reflect
whether or not music is currently playing, and responds to touches by
calling [AdaptrAudioPlayer play]
or [AdaptrAudioPlayer pause]
.
When the button has selected = false
, it should render an image to
indicate that tapping the button will start music (a triangle ‘play’
image). When the button has
selected = true
it should indicate that tapping the button will
pause music playback (a ‘pause’ image).
If the hideWhenStalled
property is set to YES
, then this button
will set its hidden
property to true when the player is stalled
waiting for audio data over the network. Presumably there is an
FMActivityIndicator
in the same location on the screen that becomes
visible at the same time and the user gets an indication that the
player is working, despite no music playing.
If the station
property is set (directly, or via stationName
),
then the button’s visibility and selected
state are dependent
on the active station matching this value. Similarly, if the audioItem
property is set, the button’s visibility and selected
state
are dependent on the active song matching this value.
When the active station does not match the button’s station
value,
the button will have selected = false
and will be visible. Tapping
the button will cause the active station to change to the station
value and playback will be started in that station.
When the active song does not match the button’s audioItem
value,
the butotn will have selected = false
and will be visible. Tapping
the button will cause the player to switch to the audioItem
s station
and request playback of that specific song.
When the active station does match the button’s stationName
or
station
value, the button’s selected
property will be adjusted
as above. Additionally, if hideWhenActive
is true and the active
station matches, the button will be hidden.
Similarly, if the active song does match the button’s audioItem
value, the button’s selected
property will be adjusted
as above. Additionally, if hideWhenActive
is true and the active
song matches, the button will be hidden.