blob: aad4a93ee93810193e07b5dfa03d908bbe591fab [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright (c) 2021 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<configurator>
<domain name="CHIP"/>
<cluster>
<domain>Media</domain>
<name>Media Playback</name>
<code>0x0506</code>
<define>MEDIA_PLAYBACK_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker.</description>
<globalAttribute side="server" code="0xFFFC" value="0" />
<attribute side="server" code="0x0000" define="MEDIA_PLAYBACK_STATE" type="PlaybackStateEnum" min="0x00" max="0x02" default="0x00" writable="false" optional="false">CurrentState</attribute>
<attribute side="server" code="0x0001" define="MEDIA_PLAYBACK_START_TIME" type="EPOCH_US" min="0x00" default="0x00" writable="false" isNullable="true" optional="true">StartTime</attribute>
<attribute side="server" code="0x0002" define="MEDIA_PLAYBACK_DURATION" type="INT64U" min="0x00" default="0" writable="false" isNullable="true" optional="true">Duration</attribute>
<attribute side="server" code="0x0003" define="MEDIA_PLAYBACK_PLAYBACK_POSITION" type="PlaybackPosition" writable="false" isNullable="true" optional="true">SampledPosition</attribute>
<attribute side="server" code="0x0004" define="MEDIA_PLAYBACK_PLAYBACK_SPEED" type="single" min="0x00" default="0" writable="false" optional="true">PlaybackSpeed</attribute>
<attribute side="server" code="0x0005" define="MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_END" type="INT64U" min="0x00" writable="false" isNullable="true" optional="true">SeekRangeEnd</attribute>
<attribute side="server" code="0x0006" define="MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_START" type="INT64U" min="0x00" writable="false" isNullable="true" optional="true">SeekRangeStart</attribute>
<command source="client" code="0x00" name="Play" response="PlaybackResponse" optional="false">
<description>Upon receipt, this SHALL play media.</description>
</command>
<command source="client" code="0x01" name="Pause" response="PlaybackResponse" optional="false">
<description>Upon receipt, this SHALL pause media.</description>
</command>
<command source="client" code="0x02" name="StopPlayback" response="PlaybackResponse" optional="false">
<description>Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched.</description>
</command>
<command source="client" code="0x03" name="StartOver" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL Start Over with the current media playback item.</description>
</command>
<command source="client" code="0x04" name="Previous" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item.</description>
</command>
<command source="client" code="0x05" name="Next" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item.</description>
</command>
<command source="client" code="0x06" name="Rewind" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc).</description>
</command>
<command source="client" code="0x07" name="FastForward" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc).</description>
</command>
<command source="client" code="0x08" name="SkipForward" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows:</description>
<arg name="deltaPositionMilliseconds" type="INT64U"/>
</command>
<command source="client" code="0x09" name="SkipBackward" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows:</description>
<arg name="deltaPositionMilliseconds" type="INT64U"/>
</command>
<command source="client" code="0x0B" name="Seek" response="PlaybackResponse" optional="true">
<description>Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows:</description>
<arg name="position" type="INT64U"/>
</command>
<command source="server" code="0x0A" name="PlaybackResponse" optional="false">
<description>This command SHALL be generated in response to various Playback Request commands.</description>
<arg name="status" type="MediaPlaybackStatusEnum"/>
<arg name="data" type="CHAR_STRING" optional="true"/>
</command>
</cluster>
<struct name="PlaybackPosition">
<cluster code="0x0506"/>
<item name="updatedAt" type="INT64U"/>
<item name="position" type="INT64U" isNullable="true"/>
</struct>
<enum name="PlaybackStateEnum" type="ENUM8">
<cluster code="0x0506"/>
<item name="Playing" value="0x00"/>
<item name="Paused" value="0x01"/>
<item name="NotPlaying" value="0x02"/>
<item name="Buffering" value="0x03"/>
</enum>
<enum name="MediaPlaybackStatusEnum" type="ENUM8">
<cluster code="0x0506"/>
<item name="Success" value="0x00"/>
<item name="InvalidStateForCommand" value="0x01"/>
<item name="NotAllowed" value="0x02"/>
<item name="NotActive" value="0x03"/>
<item name="SpeedOutOfRange" value="0x04"/>
<item name="SeekOutOfRange" value="0x05"/>
</enum>
<bitmap name="MediaPlaybackFeature" type="BITMAP32">
<cluster code="0x0506"/>
<field name="AdvancedSeek" mask="0x1"/>
<field name="VariableSpeed" mask="0x2"/>
</bitmap>
</configurator>