Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLSetMediaClockTimer

SDLSetMediaClockTimer Class Reference

Section Contents

Overview

Sets the media clock/timer value and the update method (e.g.count-up, count-down, etc.)

Function Group: Base

HMILevel needs to be FULL, LIMITIED or BACKGROUND

Since SmartDeviceLink 1.0

+countUpFromStartTimeInterval:toEndTimeInterval:playPauseIndicator:

Create a media clock timer that counts up, e.g from 0:00 to 4:18.

This will fail if startTime is greater than endTime

Objective-C

+ (nonnull instancetype)countUpFromStartTimeInterval:(NSTimeInterval)startTime
                                   toEndTimeInterval:(NSTimeInterval)endTime
                                  playPauseIndicator:
                                      (nullable SDLAudioStreamingIndicator)
                                          playPauseIndicator;

Swift

class func countUp(from startTime: TimeInterval, to endTime: TimeInterval, playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

startTime

The start time interval, e.g. (0) 0:00

endTime

The end time interval, e.g. (258) 4:18

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+countUpFromStartTimeInterval:toEndTimeInterval:playPauseIndicator:forwardSeekIndicator:backSeekIndicator:countRate:

Create a media clock timer that counts up, e.g from 0:00 to 4:18.

This will fail if startTime is greater than endTime

Objective-C

+ (nonnull instancetype)
    countUpFromStartTimeInterval:(NSTimeInterval)startTime
               toEndTimeInterval:(NSTimeInterval)endTime
              playPauseIndicator:
                  (nullable SDLAudioStreamingIndicator)playPauseIndicator
            forwardSeekIndicator:
                (nullable SDLSeekStreamingIndicator *)forwardSeekIndicator
               backSeekIndicator:
                   (nullable SDLSeekStreamingIndicator *)backSeekIndicator
                       countRate:(nullable NSNumber<SDLFloat> *)countRate;

Swift

class func countUp(from startTime: TimeInterval, to endTime: TimeInterval, playPauseIndicator: SDLAudioStreamingIndicator?, forwardSeekIndicator: SDLSeekStreamingIndicator?, backSeekIndicator: SDLSeekStreamingIndicator?, countRate: (NSNumber & SDLFloat)?) -> Self

Parameters

startTime

The start time interval, e.g. (0) 0:00

endTime

The end time interval, e.g. (258) 4:18

playPauseIndicator

An optional audio indicator to change the play/pause button

countRate

set the media playback timer, if nil, will default to 1.0

forwardSeekIndicator

- forwardSeekIndicator

backSeekIndicator

- backSeekIndicator

Return Value

An object of SetMediaClockTimer

+countUpFromStartTime:toEndTime:playPauseIndicator:

Create a media clock timer that counts up, e.g from 0:00 to 4:18.

This will fail if startTime is greater than endTime

Objective-C

+ (nonnull instancetype)countUpFromStartTime:(nonnull SDLStartTime *)startTime
                                   toEndTime:(nonnull SDLStartTime *)endTime
                          playPauseIndicator:
                              (nullable SDLAudioStreamingIndicator)
                                  playPauseIndicator;

Swift

class func countUp(from startTime: SDLStartTime, to endTime: SDLStartTime, playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

startTime

The start time interval, e.g. 0:00

endTime

The end time interval, e.g. 4:18

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+countUpFromStartTime:toEndTime:playPauseIndicator:forwardSeekIndicator:backSeekIndicator:countRate:

Create a media clock timer that counts up, e.g from 0:00 to 4:18.

This will fail if startTime is greater than endTime

Objective-C

+ (nonnull instancetype)
    countUpFromStartTime:(nonnull SDLStartTime *)startTime
               toEndTime:(nonnull SDLStartTime *)endTime
      playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator
    forwardSeekIndicator:
        (nullable SDLSeekStreamingIndicator *)forwardSeekIndicator
       backSeekIndicator:(nullable SDLSeekStreamingIndicator *)backSeekIndicator
               countRate:(nullable NSNumber<SDLFloat> *)countRate;

Swift

class func countUp(from startTime: SDLStartTime, to endTime: SDLStartTime, playPauseIndicator: SDLAudioStreamingIndicator?, forwardSeekIndicator: SDLSeekStreamingIndicator?, backSeekIndicator: SDLSeekStreamingIndicator?, countRate: (NSNumber & SDLFloat)?) -> Self

Parameters

startTime

The start time interval, e.g. 0:00

endTime

The end time interval, e.g. 4:18

playPauseIndicator

An optional audio indicator to change the play/pause button

forwardSeekIndicator

- forwardSeekIndicator

backSeekIndicator

- backSeekIndicator

countRate

set the media playback timer, if nil, will default to 1.0

Return Value

An object of SetMediaClockTimer

+countDownFromStartTimeInterval:toEndTimeInterval:playPauseIndicator:

Create a media clock timer that counts down, e.g. from 4:18 to 0:00

This will fail if endTime is greater than startTime

Objective-C

+ (nonnull instancetype)countDownFromStartTimeInterval:(NSTimeInterval)startTime
                                     toEndTimeInterval:(NSTimeInterval)endTime
                                    playPauseIndicator:
                                        (nullable SDLAudioStreamingIndicator)
                                            playPauseIndicator;

Swift

class func countDown(from startTime: TimeInterval, to endTime: TimeInterval, playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

startTime

The start time interval, e.g. (258) 4:18

endTime

The end time interval, e.g. (0) 0:00

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+countDownFromStartTimeInterval:toEndTimeInterval:playPauseIndicator:forwardSeekIndicator:backSeekIndicator:countRate:

Create a media clock timer that counts down, e.g. from 4:18 to 0:00

This will fail if endTime is greater than startTime

Objective-C

+ (nonnull instancetype)
    countDownFromStartTimeInterval:(NSTimeInterval)startTime
                 toEndTimeInterval:(NSTimeInterval)endTime
                playPauseIndicator:
                    (nullable SDLAudioStreamingIndicator)playPauseIndicator
              forwardSeekIndicator:
                  (nullable SDLSeekStreamingIndicator *)forwardSeekIndicator
                 backSeekIndicator:
                     (nullable SDLSeekStreamingIndicator *)backSeekIndicator
                         countRate:(nullable NSNumber<SDLFloat> *)countRate;

Swift

class func countDown(from startTime: TimeInterval, to endTime: TimeInterval, playPauseIndicator: SDLAudioStreamingIndicator?, forwardSeekIndicator: SDLSeekStreamingIndicator?, backSeekIndicator: SDLSeekStreamingIndicator?, countRate: (NSNumber & SDLFloat)?) -> Self

Parameters

startTime

The start time interval, e.g. (258) 4:18

endTime

The end time interval, e.g. (0) 0:00

playPauseIndicator

An optional audio indicator to change the play/pause button

forwardSeekIndicator

- forwardSeekIndicator

backSeekIndicator

- backSeekIndicator

countRate

set the media playback timer, if nil, will default to 1.0

Return Value

An object of SetMediaClockTimer

+countDownFromStartTime:toEndTime:playPauseIndicator:

Create a media clock timer that counts down, e.g. from 4:18 to 0:00

This will fail if endTime is greater than startTime

Objective-C

+ (nonnull instancetype)countDownFromStartTime:(nonnull SDLStartTime *)startTime
                                     toEndTime:(nonnull SDLStartTime *)endTime
                            playPauseIndicator:
                                (nullable SDLAudioStreamingIndicator)
                                    playPauseIndicator;

Swift

class func countDown(from startTime: SDLStartTime, to endTime: SDLStartTime, playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

startTime

The start time interval, e.g. 4:18

endTime

The end time interval, e.g. 0:00

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+countDownFromStartTime:toEndTime:playPauseIndicator:forwardSeekIndicator:backSeekIndicator:countRate:

Create a media clock timer that counts down, e.g. from 4:18 to 0:00

This will fail if endTime is greater than startTime

Objective-C

+ (nonnull instancetype)
    countDownFromStartTime:(nonnull SDLStartTime *)startTime
                 toEndTime:(nonnull SDLStartTime *)endTime
        playPauseIndicator:
            (nullable SDLAudioStreamingIndicator)playPauseIndicator
      forwardSeekIndicator:
          (nullable SDLSeekStreamingIndicator *)forwardSeekIndicator
         backSeekIndicator:
             (nullable SDLSeekStreamingIndicator *)backSeekIndicator
                 countRate:(nullable NSNumber<SDLFloat> *)countRate;

Swift

class func countDown(from startTime: SDLStartTime, to endTime: SDLStartTime, playPauseIndicator: SDLAudioStreamingIndicator?, forwardSeekIndicator: SDLSeekStreamingIndicator?, backSeekIndicator: SDLSeekStreamingIndicator?, countRate: (NSNumber & SDLFloat)?) -> Self

Parameters

startTime

The start time interval, e.g. 4:18

endTime

The end time interval, e.g. 0:00

playPauseIndicator

An optional audio indicator to change the play/pause button

forwardSeekIndicator

- forwardSeekIndicator

backSeekIndicator

- backSeekIndicator

countRate

set the media playback timer, if nil, will default to 1.0

Return Value

An object of SetMediaClockTimer

+pauseWithPlayPauseIndicator:

Pause an existing (counting up / down) media clock timer

Objective-C

+ (nonnull instancetype)pauseWithPlayPauseIndicator:
    (nullable SDLAudioStreamingIndicator)playPauseIndicator;

Swift

class func pause(playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+updatePauseWithNewStartTimeInterval:endTimeInterval:playPauseIndicator:

Update a pause time (or pause and update the time) on a media clock timer

Objective-C

+ (nonnull instancetype)
    updatePauseWithNewStartTimeInterval:(NSTimeInterval)startTime
                        endTimeInterval:(NSTimeInterval)endTime
                     playPauseIndicator:(nullable SDLAudioStreamingIndicator)
                                            playPauseIndicator;

Swift

class func pause(newStart startTime: TimeInterval, newEnd endTime: TimeInterval, playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

startTime

The new start time interval

endTime

The new end time interval

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+updatePauseWithNewStartTime:endTime:playPauseIndicator:

Update a pause time (or pause and update the time) on a media clock timer

Objective-C

+ (nonnull instancetype)
    updatePauseWithNewStartTime:(nonnull SDLStartTime *)startTime
                        endTime:(nonnull SDLStartTime *)endTime
             playPauseIndicator:
                 (nullable SDLAudioStreamingIndicator)playPauseIndicator;

Swift

class func pause(newStart startTime: SDLStartTime, newEnd endTime: SDLStartTime, playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

startTime

The new start time

endTime

The new end time

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+resumeWithPlayPauseIndicator:

Resume a paused media clock timer. It resumes at the same time at which it was paused.

Objective-C

+ (nonnull instancetype)resumeWithPlayPauseIndicator:
    (nullable SDLAudioStreamingIndicator)playPauseIndicator;

Swift

class func resume(playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

+resumeWithPlayPauseIndicator:forwardSeekIndicator:backSeekIndicator:countRate:

Resume a paused media clock timer. It resumes at the same time at which it was paused.

Objective-C

+ (nonnull instancetype)
    resumeWithPlayPauseIndicator:
        (nullable SDLAudioStreamingIndicator)playPauseIndicator
            forwardSeekIndicator:
                (nullable SDLSeekStreamingIndicator *)forwardSeekIndicator
               backSeekIndicator:
                   (nullable SDLSeekStreamingIndicator *)backSeekIndicator
                       countRate:(nullable NSNumber<SDLFloat> *)countRate;

Swift

class func resume(playPauseIndicator: SDLAudioStreamingIndicator?, forwardSeekIndicator: SDLSeekStreamingIndicator?, backSeekIndicator: SDLSeekStreamingIndicator?, countRate: (NSNumber & SDLFloat)?) -> Self

Parameters

playPauseIndicator

An optional audio indicator to change the play/pause button

forwardSeekIndicator

- forwardSeekIndicator

backSeekIndicator

- backSeekIndicator

countRate

set the media playback timer

Return Value

An object of SetMediaClockTimer, if nil, will default to 1.0

+clearWithPlayPauseIndicator:

Remove a media clock timer from the screen

Objective-C

+ (nonnull instancetype)clearWithPlayPauseIndicator:
    (nullable SDLAudioStreamingIndicator)playPauseIndicator;

Swift

class func clear(playPauseIndicator: SDLAudioStreamingIndicator?) -> Self

Parameters

playPauseIndicator

An optional audio indicator to change the play/pause button

Return Value

An object of SetMediaClockTimer

-initWithUpdateMode:

Objective-C

- (nonnull instancetype)initWithUpdateMode:(nonnull SDLUpdateMode)updateMode;

Swift

init(updateMode: SDLUpdateMode)

Parameters

updateMode

- updateMode

Return Value

A SDLSetMediaClockTimer object

-initWithUpdateMode:startTime:endTime:playPauseIndicator:

Create a SetMediaClockTimer RPC with all available parameters. It’s recommended to use the specific initializers above.

Objective-C

- (nonnull instancetype)initWithUpdateMode:(nonnull SDLUpdateMode)updateMode
                                 startTime:(nullable SDLStartTime *)startTime
                                   endTime:(nullable SDLStartTime *)endTime
                        playPauseIndicator:(nullable SDLAudioStreamingIndicator)
                                               playPauseIndicator;

Swift

init(updateMode: SDLUpdateMode, startTime: SDLStartTime?, endTime: SDLStartTime?, playPauseIndicator: SDLAudioStreamingIndicator?)

Parameters

updateMode

The type of SetMediaClockTimer RPC

startTime

The start time. Only valid in some updateModes.

endTime

The end time. Only valid in some updateModes.

playPauseIndicator

The display of the play/pause button

Return Value

An object of SetMediaClockTimer

-initWithUpdateMode:startTime:endTime:audioStreamingIndicator:forwardSeekIndicator:backSeekIndicator:countRate:

Objective-C

- (nonnull instancetype)
         initWithUpdateMode:(nonnull SDLUpdateMode)updateMode
                  startTime:(nullable SDLStartTime *)startTime
                    endTime:(nullable SDLStartTime *)endTime
    audioStreamingIndicator:
        (nullable SDLAudioStreamingIndicator)audioStreamingIndicator
       forwardSeekIndicator:
           (nullable SDLSeekStreamingIndicator *)forwardSeekIndicator
          backSeekIndicator:
              (nullable SDLSeekStreamingIndicator *)backSeekIndicator
                  countRate:(nullable NSNumber<SDLFloat> *)countRate;

Swift

init(updateMode: SDLUpdateMode, startTime: SDLStartTime?, end endTime: SDLStartTime?, audioStreamingIndicator: SDLAudioStreamingIndicator?, forwardSeekIndicator: SDLSeekStreamingIndicator?, backSeekIndicator: SDLSeekStreamingIndicator?, countRate: (NSNumber & SDLFloat)?)

Parameters

updateMode

- updateMode

startTime

- startTime

endTime

- endTime

audioStreamingIndicator

- audioStreamingIndicator

forwardSeekIndicator

- forwardSeekIndicator

backSeekIndicator

- backSeekIndicator

countRate

- countRate

Return Value

A SDLSetMediaClockTimer object

startTime

A Start Time with specifying hour, minute, second values

@discussion A startTime object with specifying hour, minute, second values

Notes:

  • If “updateMode” is COUNTUP or COUNTDOWN, this parameter must be provided
  • Will be ignored for PAUSE/RESUME and CLEAR

Objective-C

@property (nonatomic, strong, nullable) SDLStartTime *startTime;

Swift

var startTime: SDLStartTime? { get set }

endTime

An END time of type SDLStartTime, specifying hour, minute, second values

@discussion An SDLStartTime object with specifying hour, minute, second values

Objective-C

@property (nonatomic, strong, nullable) SDLStartTime *endTime;

Swift

var endTime: SDLStartTime? { get set }

updateMode

The media clock/timer update mode (COUNTUP/COUNTDOWN/PAUSE/RESUME)

@discussion a Enumeration value (COUNTUP/COUNTDOWN/PAUSE/RESUME)

Notes:

  • When updateMode is PAUSE, RESUME or CLEAR, the start time value is ignored
  • When updateMode is RESUME, the timer resumes counting from the timer’s value when it was paused

Objective-C

@property (nonatomic, strong) SDLUpdateMode _Nonnull updateMode;

Swift

var updateMode: SDLUpdateMode { get set }

audioStreamingIndicator

The audio streaming indicator used for a play/pause button.

@discussion Set the indicator icon of a play/pause button depending on the current audio playback. This parameter is optional. If omitted the last indicator sent will not change.

Objective-C

@property (nonatomic, strong, nullable) SDLAudioStreamingIndicator audioStreamingIndicator;

Swift

var audioStreamingIndicator: SDLAudioStreamingIndicator? { get set }

forwardSeekIndicator

Used to control the forward seek button to either skip forward a set amount of time or to the next track.

@added in SmartDeviceLink 7.1.0

Objective-C

@property (nonatomic, strong, nullable) SDLSeekStreamingIndicator *forwardSeekIndicator;

Swift

var forwardSeekIndicator: SDLSeekStreamingIndicator? { get set }

backSeekIndicator

Used to control the back seek button to either skip back a set amount of time or to the previous track.

@added in SmartDeviceLink 7.1.0

Objective-C

@property (nonatomic, strong, nullable) SDLSeekStreamingIndicator *backSeekIndicator;

Swift

var backSeekIndicator: SDLSeekStreamingIndicator? { get set }

countRate

The value of this parameter is the amount that the media clock timer will advance per 1.0 seconds of real time. Values less than 1.0 will therefore advance the timer slower than real-time, while values greater than 1.0 will advance the timer faster than real-time. e.g. If this parameter is set to 0.5, the timer will advance one second per two seconds real-time, or at 50% speed. If this parameter is set to 2.0, the timer will advance two seconds per one second real-time, or at 200% speed. {“num_min_value”: 0.1, “num_max_value”: 100.0, “default_value”: 1.0}

@added in SmartDeviceLink 7.1.0

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *countRate;

Swift

var countRate: (NSNumber & SDLFloat)? { get set }
View on GitHub.com
Previous Section Next Section