The UI.SetMediaClock timer request indicates either an initial value for the media clock timer for a media application or an update to this value. The request may come for the application which is not currently active on the HMI.
updateMode
parameter: updateMode
parameter:startTime
value with a step of 1 second;startTime
or endTime
parameters are provided, the values must be updated on the HMI. startTime
to 00:00:00 in the case that the startTime
parameter is not provided in the request, otherwise, startTime
must be updated with a new value. It is up to HMI to determine the way the media clock timer is cleared: either to remove it from display or to set it to zero. mediaClock
field is not indicated as supported in UI.GetCapabilities. Name | Type | Mandatory | Description |
---|---|---|---|
startTime | Common.TimeFormat | false | startTime must be provided together with modes: "COUNTUP", "COUNTDOWN", "PAUSE" to HMI. startTime will be ignored for "RESUME", and "CLEAR". |
endTime | Common.TimeFormat | false | endTime can be provided together with modes: "COUNTUP", "COUNTDOWN", "PAUSE" to HMI. To be used to calculate any visual progress bar (if not provided, this feature is ignored). If endTime is greater then startTime for COUNTDOWN or less than startTime for COUNTUP, then the request will return an INVALID_DATA. endTime will be ignored for "PAUSE", "RESUME", and "CLEAR". |
updateMode | Common.ClockUpdateMode | true | Enumeration to control the media clock. In case of pause, resume, or clear, the start time value is ignored and shall be left out. For resume, the time continues with the same value as it was when paused. |
audioStreamingIndicator | Common.AudioStreamingIndicator | false | Indicates that a button press of the Play/Pause button would play, pause or stop the current playback. |
appID | Integer | true |
Result | Description | Message type WebSocket | Message type D-Bus | Message Params | Notes |
---|---|---|---|---|---|
Success | SUCCESS: 1. HMI has started counting up or down the media clock from the requested value (in case of COUNTUP or COUNTDOWN requested mode). 2. HMI has paused the media clock value (PAUSE requested mode). 3. HMI has resumed the media clock in the mode that had been in effect before pausing, i.e. has started counting up or down (RESUME requested mode). 4. HMI has cleared the existing media clock value (CLEAR requested mode). |
JSON response | Method return | code: 0 | HMI must respond right after the action requested with updateMode parameter has been performed. |
Failure | IGNORED: 1. Request with RESUME mode arrives when the media clock is counting, already resumed or cleared with the previous request. 2. Request with PAUSE mode arrives when the media clock is paused or cleared with the previous request. |
JSON error message | Method return | code: 6 | Applicable to this RPC result codes. |
Failure | INVALID_DATA: The data sent is invalid (invalid JSON syntax or parameters out of bounds or of wrong type) | JSON error message | Method return | code: 11 | Applicable to this RPC result codes. |
Failure | INVALID_ID: appID is invalid (e.g. doesn’t exist) | JSON error message | Method return | code: 13 | Applicable to this RPC result codes. |
Failure | GENERIC_ERROR: The unknown issue occurred or other codes are not applicable. | JSON error message | Method return | code: 22 | Applicable to this RPC result codes. |
{ "id" : 109, "jsonrpc" : "2.0", "method" : "UI.SetMediaClockTimer", "params" : { "startTime" : { "hours" : 0, "minutes" : 18, "seconds" : 17 }, "updateMode" : "COUNTUP", "audioStreamingIndicator" : "PAUSE", "appID" : 65146 } }
{ "id" : 109, "jsonrpc" : "2.0", "result" : { "code" : 0, "method" : "UI.SetMediaClockTimer" } }
{ "id" : 109, "jsonrpc" : "2.0", "error" : { "code" : 11, "message" : "Invalid data", "data" : { "method" : "UI.SetMediaClockTimer" } } }