Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add countRate to SetMediaClockTimer #355

Merged
merged 1 commit into from
Jan 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions lib/js/src/rpc/messages/SetMediaClockTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,32 @@ class SetMediaClockTimer extends RpcRequest {
getAudioStreamingIndicator () {
return this.getObject(AudioStreamingIndicator, SetMediaClockTimer.KEY_AUDIO_STREAMING_INDICATOR);
}

/**
* Set the CountRate
* @since SmartDeviceLink 7.1.0
* @param {Number} rate - 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. - The desired CountRate.
* {'num_min_value': 0.1, 'num_max_value': 100.0}
* @returns {SetMediaClockTimer} - The class instance for method chaining.
*/
setCountRate (rate) {
this.setParameter(SetMediaClockTimer.KEY_COUNT_RATE, rate);
return this;
}

/**
* Get the CountRate
* @returns {Number} - the KEY_COUNT_RATE value
*/
getCountRate () {
return this.getParameter(SetMediaClockTimer.KEY_COUNT_RATE);
}
}

SetMediaClockTimer.KEY_START_TIME = 'startTime';
SetMediaClockTimer.KEY_END_TIME = 'endTime';
SetMediaClockTimer.KEY_UPDATE_MODE = 'updateMode';
SetMediaClockTimer.KEY_AUDIO_STREAMING_INDICATOR = 'audioStreamingIndicator';
SetMediaClockTimer.KEY_COUNT_RATE = 'countRate';

export { SetMediaClockTimer };