Crestron Components Lib - Showcase App

ch5-media-player: contractName

contractName attribute

ContractName attribute sets the name of the contract.

NOTE: The Showcase app is not capable of testing with this attribute. Please check this attribute with Contract enabled control system. If the initial value of contractName is assigned as "LivingRoom.Player" and the markup as follow:

<ch5-media-player
        contractName="LivingRoom.Player"
        receiveStateEnable="mediaPlayerEnable"
        receiveStateShow="mediaPlayerShow"
        receiveStateCustomStyle="mediaPlayerCustomStyle"
        receiveStateCustomClass="mediaPlayerCustomClass">
</ch5-media-player>


Use Contract Use Contract Value Contract Attribute Name Attribute Example
CRPC_FB receiveStateCRPC LivingRoom.Player.CRPC_FB
CRPC sendEventCRPC LivingRoom.Player.CRPC
Message_FB receiveStateMessage LivingRoom.Player.Message_FB
Refresh receiveStateRefreshMediaPlayer LivingRoom.Player.Refresh
Offline receiveStateDeviceOffline LivingRoom.Player.Offline
Player_Name receiveStatePlayerName LivingRoom.Player.Player_Name
useContractForShow TRUE Visible receiveStateShow LivingRoom.Player.Visible
useContractForShow FALSE receiveStateShow MPShow
useContractForEnable TRUE Enabled receiveStateEnable LivingRoom.Player.Enabled
useContractForEnable FALSE receiveStateEnable MPEnable
useContractForCustomClass TRUE CustomClass receiveStateCustomClass LivingRoom.Player.CustomClass
useContractForCustomClass FALSE receiveStateCustomClass MPCustomClass
useContractForCustomStyle TRUE CustomStyle receiveStateCustomStyle LivingRoom.Player.CustomStyle
useContractForCustomStyle FALSE receiveStateCustomStyle MPCustomStyle
<ch5-media-player contractName="LivingRoom.Player" demoMode="true"></ch5-media-player>

useContractForShow attribute

The default value is false.

When true, contract 'Show' state determines if the Media Player is enabled.

When false, the 'receiveStateShow' join may be applied. Consistent with other components,

if the 'receiveStateShow' join is provide, the value of that join determines if the component is visible.

<ch5-media-player useContractForShow="true" demoMode="true" ></ch5-media-player>

useContractForEnable attribute

The default value is false.

When true, the contract 'Enable' state determines if the Media Player is enabled.

When false, the 'receiveStateEnable' join may be applied. Consistent with other components,

if the 'receiveStateEnable' join is provide, the value of that join determines if the component is enabled.

<ch5-media-player useContractForEnable="false" demoMode="true" ></ch5-media-player>

useContractForCustomClass attribute

The default value is false.

If this value is set to true then the value received from the contract will be considered to the customClass attribute.

<ch5-media-player useContractForCustomClass="true" demoMode="true" ></ch5-media-player>

useContractForCustomStyle attribute

The default value is false.

If this value is set to true then the value received from the contract will be considered to the customStyle attribute.

<ch5-media-player useContractForCustomStyle="true" demoMode="true" ></ch5-media-player>