Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
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

+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

+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

+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

+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

+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:hours:minutes:seconds:audioStreamingIndicator:

Convenience init to create a SDLSetMediaClockTimer object

Objective-C

- (nonnull instancetype)initWithUpdateMode:(nonnull SDLUpdateMode)updateMode
                                     hours:(UInt8)hours
                                   minutes:(UInt8)minutes
                                   seconds:(UInt8)seconds
                   audioStreamingIndicator:(nonnull SDLAudioStreamingIndicator)
                                               audioStreamingIndicator;

Swift

init(updateMode: SDLUpdateMode, hours: UInt8, minutes: UInt8, seconds: UInt8, audioStreamingIndicator: SDLAudioStreamingIndicator)

Parameters

updateMode

The type of SetMediaClockTimer RPC

hours

Hour

minutes

Minuute

seconds

Seconds

audioStreamingIndicator

The audio streaming indicator used for a play/pause button

Return Value

An SDLSetMediaClockTimer object

-initWithUpdateMode:hours:minutes:seconds:

Convenience init to create a SDLSetMediaClockTimer object

Objective-C

- (nonnull instancetype)initWithUpdateMode:(nonnull SDLUpdateMode)updateMode
                                     hours:(UInt8)hours
                                   minutes:(UInt8)minutes
                                   seconds:(UInt8)seconds;

Swift

init(updateMode: SDLUpdateMode, hours: UInt8, minutes: UInt8, seconds: UInt8)

Parameters

updateMode

The type of SetMediaClockTimer RPC

hours

Hour

minutes

Minuute

seconds

Seconds

Return Value

An SDLSetMediaClockTimer object

-initWithUpdateMode:

Convenience init to create a SDLSetMediaClockTimer object

Objective-C

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

Swift

init(updateMode: SDLUpdateMode)

Parameters

updateMode

he type of SetMediaClockTimer RPC

Return Value

An 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

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 }
View on GitHub.com
Previous Section Next Section