Warning, /multimedia/kmplayer/tests/clock.smil is written in an unsupported language. File is not indexed.
0001 <smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
0002 <head>
0003 <layout>
0004 <root-layout width="400" height="240" backgroundColor="green"/>
0005 <region id="hours" top="50" left="25" width="100" height="100"
0006 backgroundColor="white"/>
0007 <region id="minutes" top="50" left="150" width="100" height="100"
0008 backgroundColor="white"/>
0009 <region id="seconds" top="50" left="275" width="100" height="100"
0010 backgroundColor="white"/>
0011 <region id="chours" top="180" left="75" width="50" height="50"
0012 backgroundColor="white" showBackground="whenActive" />
0013 <region id="cminutes" top="180" left="150" width="50" height="50"
0014 backgroundColor="white" showBackground="whenActive" />
0015 <region id="show" top="200" left="275" width="100" height="30"
0016 backgroundColor="white" showBackground="whenActive"/>
0017 <region id="panel" left="25%" top="10%" width="50%" height="80%"
0018 backgroundOpacity="70">
0019 <region id="ok" top="160" left="150" width="100" height="30"
0020 backgroundColor="white" showBackground="whenActive"/>
0021 </region>
0022 </layout>
0023 <state id="mystate" language="http://www.w3.org/TR/1999/REC-xpath-19991116">
0024 <data xmlns="">
0025 <time>0</time>
0026 <hour>66</hour>
0027 <minute>66</minute>
0028 <second>66</second>
0029 <mode>0</mode>
0030 <countminutes>0</countminutes>
0031 <endtime>0</endtime>
0032 </data>
0033 </state>
0034 </head>
0035 <body>
0036 <par>
0037 <switch begin="mystate.stateChange(minute)">
0038 <text fontPtSize="35" region="minutes" src="data:,{minute}"
0039 expr="minute > 9" regPoint="center" regAlign="center"/>
0040 <text fontPtSize="35" region="minutes" src="data:,{concat('0',minute)}"
0041 regPoint="center" regAlign="center"/>
0042 </switch>
0043 <switch begin="mystate.stateChange(hour)">
0044 <text fontPtSize="35" region="hours" src="data:,{hour}"
0045 expr="hour > 9" regPoint="center" regAlign="center"/>
0046 <text fontPtSize="35" region="hours" src="data:,{concat('0',hour)}"
0047 regPoint="center" regAlign="center"/>
0048 </switch>
0049 <seq repeat="indefinite">
0050 <setvalue ref="time" value="current-time()" />
0051 <setvalue ref="hour" value="hours-from-time(time)" />
0052 <setvalue ref="minute" value="minutes-from-time(time)" />
0053 <setvalue ref="second" value="seconds-from-time(time)" />
0054 <switch dur="1" fill="freeze">
0055 <text region="seconds" fontPtSize="35" src="data:,{second}"
0056 expr="second > 9" regPoint="center" regAlign="center"/>
0057 <text region="seconds" fontPtSize="35" regPoint="center"
0058 src="data:,{concat('0',second)}" regAlign="center"/>
0059 </switch>
0060 </seq>
0061 <seq>
0062 <seq id="play" dur="indefinite">
0063 <setvalue ref="mode" value="1"/>
0064 <setvalue ref="endtime" value="hour * 60 + minute + countminutes"/>
0065 <par>
0066 <a href="#set">
0067 <text region="show" src="data:,Set%20Countdown"/>
0068 </a>
0069 <seq repeat="indefinite">
0070 <switch>
0071 <seq expr="countminutes > 0">
0072 <setvalue ref="countminutes"
0073 value="endtime - hour * 60 - minute"/>
0074 <par>
0075 <switch>
0076 <text fontPtSize="18" region="chours"
0077 expr="countminutes div 60 > 9"
0078 src="data:,{countminutes div 60}"
0079 regPoint="center" regAlign="center"/>
0080 <text fontPtSize="18" region="chours"
0081 src="data:,{concat('0',countminutes div 60)}"
0082 regPoint="center" regAlign="center"/>
0083 </switch>
0084 <switch dur="5">
0085 <text fontPtSize="18" region="cminutes"
0086 expr="countminutes mod 60 > 9"
0087 src="data:,{countminutes mod 60}"
0088 regPoint="center" regAlign="center" dur="5"/>
0089 <text fontPtSize="18" region="cminutes"
0090 src="data:,{concat('0',countminutes mod 60)}"
0091 regPoint="center" regAlign="center" dur="5"/>
0092 </switch>
0093 </par>
0094 </seq>
0095 <seq dur="indefinite"/>
0096 </switch>
0097 </seq>
0098 </par>
0099 </seq>
0100 <seq id="set" dur="indefinite">
0101 <setvalue ref="mode" value="0"/>
0102 <par>
0103 <set target="panel" attribute="background-color" to="black"/>
0104 <text region="panel" src="data:,{countminutes}" top="5" left="10"
0105 height="20" fontPtSize="16" fontColor="white"
0106 begin="0;mystate.stateChange(countminutes)"/>
0107 <text region="panel" src="data:,1" top="30" left="10" height="20"
0108 id="t1" fontPtSize="18" width="20" fontColor="yellow"/>
0109 <text region="panel" src="data:,2" top="30" left="40" height="20"
0110 id="t2" fontPtSize="18" width="20" fontColor="yellow"/>
0111 <text region="panel" src="data:,3" top="30" left="70" height="20"
0112 id="t3" fontPtSize="18" width="20" fontColor="yellow"/>
0113 <text region="panel" src="data:,4" top="60" left="10" height="20"
0114 id="t4" fontPtSize="18" width="20" fontColor="yellow"/>
0115 <text region="panel" src="data:,5" top="60" left="40" height="20"
0116 id="t5" fontPtSize="18" width="20" fontColor="yellow"/>
0117 <text region="panel" src="data:,6" top="60" left="70" height="20"
0118 id="t6" fontPtSize="18" width="20" fontColor="yellow"/>
0119 <text region="panel" src="data:,7" top="90" left="10" height="20"
0120 id="t7" fontPtSize="18" width="20" fontColor="yellow"/>
0121 <text region="panel" src="data:,8" top="90" left="40" height="20"
0122 id="t8" fontPtSize="18" width="20" fontColor="yellow"/>
0123 <text region="panel" src="data:,9" top="90" left="70" height="20"
0124 id="t9" fontPtSize="18" width="20" fontColor="yellow"/>
0125 <text region="panel" src="data:,0" top="120" left="10" height="20"
0126 id="t0" fontPtSize="18" width="20" fontColor="yellow"/>
0127 <text region="panel" src="data:,C" top="120" left="70" height="20"
0128 id="tC" fontPtSize="18" width="20" fontColor="yellow"/>
0129 <setvalue ref="countminutes" value="countminutes * 10 + 1"
0130 begin="t1.activateEvent"/>
0131 <setvalue ref="countminutes" value="countminutes * 10 + 2"
0132 begin="t2.activateEvent"/>
0133 <setvalue ref="countminutes" value="countminutes * 10 + 3"
0134 begin="t3.activateEvent"/>
0135 <setvalue ref="countminutes" value="countminutes * 10 + 4"
0136 begin="t4.activateEvent"/>
0137 <setvalue ref="countminutes" value="countminutes * 10 + 5"
0138 begin="t5.activateEvent"/>
0139 <setvalue ref="countminutes" value="countminutes * 10 + 6"
0140 begin="t6.activateEvent"/>
0141 <setvalue ref="countminutes" value="countminutes * 10 + 7"
0142 begin="t7.activateEvent"/>
0143 <setvalue ref="countminutes" value="countminutes * 10 + 8"
0144 begin="t8.activateEvent"/>
0145 <setvalue ref="countminutes" value="countminutes * 10 + 9"
0146 begin="t9.activateEvent"/>
0147 <setvalue ref="countminutes" value="countminutes * 10"
0148 begin="t0.activateEvent"/>
0149 <setvalue ref="countminutes" value="0"
0150 begin="tC.activateEvent"/>
0151 <a href="#play">
0152 <text region="ok" src="data:,Ok"/>
0153 </a>
0154 </par>
0155 </seq>
0156 </seq>
0157 </par>
0158 </body>
0159 </smil>
0160