diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/animate.smil | 107 | ||||
-rw-r--r-- | tests/controls.html | 29 | ||||
-rw-r--r-- | tests/excl_timings.smil | 84 | ||||
-rw-r--r-- | tests/fade.rp | 8 | ||||
-rw-r--r-- | tests/img_scale.smil | 27 | ||||
-rw-r--r-- | tests/img_scale_rep.smil | 27 | ||||
-rw-r--r-- | tests/img_video_text.smil | 32 | ||||
-rw-r--r-- | tests/nested_smil.smil | 25 | ||||
-rw-r--r-- | tests/par_timings.smil | 37 | ||||
-rw-r--r-- | tests/region_animate.smil | 40 | ||||
-rw-r--r-- | tests/region_mouse_events.smil | 115 | ||||
-rw-r--r-- | tests/regpoint.smil | 53 | ||||
-rw-r--r-- | tests/rp.smil | 13 | ||||
-rw-r--r-- | tests/smil_files.m3u | 6 | ||||
-rw-r--r-- | tests/some_text.html | 6 | ||||
-rw-r--r-- | tests/text.smil | 40 | ||||
-rw-r--r-- | tests/timings.smil | 57 | ||||
-rw-r--r-- | tests/transition.smil | 181 |
18 files changed, 887 insertions, 0 deletions
diff --git a/tests/animate.smil b/tests/animate.smil new file mode 100644 index 0000000..df4a330 --- /dev/null +++ b/tests/animate.smil @@ -0,0 +1,107 @@ +<!-- test for moving a region with the animate element --> +<smil> + <head> + <layout> + <root-layout width="400" height="300" background-color="green"/> + <region id="region1" left="5%" top="10%" right="5%" bottom="10%"/> + <region id="region2" left="5%" top="10%" width="20%" height="20%" + background-color="yellow" showBackground="whenActive"/> + <region id="regimg1"/> + </layout> + <transition id="fade1" dur="1" type="fade"/> + </head> + <body> + <par> + <img dur="40" id="img" src="../icons/hi48-app-kmplayer.png" + region="regimg1" left="25" top="10" rn:mediaOpacity="40%" + transIn="fade1" transOut="fade1"/> + <animateMotion target="img" dur="20" calcMode="spline" repeat="1" + values="25,10;300,45;25,85;300,125;25,165;300,205;25,80;25,10" + keyTimes="0;.1;.2;.4;.6;.8;.9;1" + keySplines=".5 0 .5 1;0 .75 .25 1;0 .75 .25 1;.5 0 .5 1;.5 0 .5 1;0 .75 .25 1;.5 0 .5 1"/> + <par begin="2"> + <img dur="40" id="img2" src="../icons/hi48-app-kmplayer.png" + region="regimg1" left="25" top="10" rn:mediaOpacity="40%" + transIn="fade1" transOut="fade1"/> + <animateMotion target="img2" dur="20" calcMode="spline" repeat="1" + values="25,10;300,45;25,85;300,125;25,165;300,205;25,80;25,10" + keyTimes="0;.1;.2;.4;.6;.8;.9;1" + keySplines=".5 0 .5 1;0 .75 .25 1;0 .75 .25 1;.5 0 .5 1;.5 0 .5 1;0 .75 .25 1;.5 0 .5 1"/> + </par> + <par begin="4"> + <img dur="40" id="img3" src="../icons/hi48-app-kmplayer.png" + region="regimg1" left="25" top="10" rn:mediaOpacity="40%" + transIn="fade1" transOut="fade1"/> + <animateMotion target="img3" dur="20" calcMode="spline" repeat="1" + values="25,10;300,45;25,85;300,125;25,165;300,205;25,80;25,10" + keyTimes="0;.1;.2;.4;.6;.8;.9;1" + keySplines=".5 0 .5 1;0 .75 .25 1;0 .75 .25 1;.5 0 .5 1;.5 0 .5 1;0 .75 .25 1;.5 0 .5 1"/> + </par> + <seq> + <par> + <text id="text1" src="data:,8,8%20animateMotion%20by%2032x32%20and%20back" + region="region1" left="8" top="8" dur="5"/> + <animateMotion target="text1" begin="1" dur=".5" by="32,32"/> + <animateMotion target="text1" begin="3" dur=".5" by="-32,-32"/> + </par> + <par> + <text id="text2" src="data:,20%25,75%25%0AanimateMotion%0Ato%2040%25,20%25%0Aback%20to%20150,20" + region="region1" left="20%" top="75%" dur="5"/> + <animateMotion target="text2" begin="1" dur=".5" to="40%,20%"/> + <animateMotion target="text2" begin="3" dur=".5" to="150,20"/> + </par> + <par> + <text id="text3" src="data:,8,8%0AanimateMotion%0Afrom%2040%25,20%25%0Aby%2040%25,-20%25" + region="region1" left="8" top="8" dur="3"/> + <animateMotion target="text3" begin="1" dur=".5" + from="20%,75%" by="40%,-20%"/> + </par> + <par> + <text id="text4" src="data:,8,8%0AanimateMotion%0Afrom%2010,150%0Ato%20150,10" + region="region1" left="8" top="8" dur="3"/> + <animateMotion target="text4" begin="1" dur=".5" + from="10,150" to="150,10"/> + </par> + <par> + <text id="text6" src="data:,lineair%20animateMotion%0Avalues%2020,20;150,5;160,160" + region="region1" left="8" top="8" dur="5"/> + <animateMotion target="text6" begin="2" dur="2" + values="20,20;150,5;160,170"/> + </par> + <par> + <text id="text7" src="data:,lineair%20animateMotion%0Avalues%2020,20;160,35;140,160%0AkeyTimes0;0.8;1" + region="region1" left="8" top="8" dur="5"/> + <animateMotion target="text7" begin="2" dur="2" + values="20,20;160,35;140,160" keyTimes="0;0.8;1"/> + </par> + <par> + <text id="text8" src="data:,spline%20animateMotion%0Avalues%2020,20;160,35;140,160%0AkeyTimes0;0.5;1%0AkeySplines%20.5%200%20.5%201;0%20.75%20.25%201" + region="region1" left="8" top="8" dur="5"/> + <animateMotion target="text8" begin="1" dur="3" calcMode="spline" + values="20,20;160,35;140,160" + keyTimes="0;0.5;1" + keySplines=".5 0 .5 1;0 .75 .25 1"/> + </par> + <par> + <text id="text9" src="data:,discrete%20animateMotion%0Avalues%2020,20;160,35;140,160%0AkeyTimes0;0.5;1" + region="region1" left="8" top="8" dur="5"/> + <animateMotion target="text9" begin="1" dur="3" calcMode="discrete" + values="20,20;160,35;140,160" + keyTimes="0;0.5;1"/> + </par> + <par> + <text regPoint="center" regAlign="center" id="text5" src="data:,animateMotion%20on%20region" + region="region2" dur="10"/> + <animateMotion target="region2" begin="1" dur="2" calcMode="spline" + from="5%,10%" to="55%, 15%" keySplines=".5 0 .5 1"/> + <animateMotion target="region2" begin="3" dur="2" calcMode="spline" + to="65%,60%" keySplines=".5 0 .5 1"/> + <animateMotion target="region2" begin="5" dur="2" calcMode="spline" + by="-45%,10%" keySplines=".5 0 .5 1"/> + <animateMotion target="region2" begin="7" dur="2" calcMode="spline" + from="20%,70%" by="-15%,-60%" keySplines="1 0 0 1"/> + </par> + </seq> + </par> + </body> +</smil> diff --git a/tests/controls.html b/tests/controls.html new file mode 100644 index 0000000..c18bcc5 --- /dev/null +++ b/tests/controls.html @@ -0,0 +1,29 @@ +<html> + <body> + <table> + <tr> + <td COLSPAN=2> + <embed SRC="excl_timings.smil" TYPE="audio/x-pn-realaudio" WIDTH=320 HEIGHT=240 CONTROLS=ImageWindow CONSOLE=one AUTOSTART=true></embed> + </td> + <td> + <embed WIDTH=240 HEIGHT=240 TYPE="audio/x-pn-realaudio" CONTROLS=PlayList CONSOLE=one AUTOSTART=true></embed> + </td> + </tr> + <tr> + <td> + <embed WIDTH=160 HEIGHT=16 TYPE="audio/x-pn-realaudio" CONTROLS=PlayButton CONSOLE=one AUTOSTART=true></embed> + </td> + <td> + <embed WIDTH=160 HEIGHT=16 TYPE="audio/x-pn-realaudio" CONTROLS=VolumeSlider CONSOLE=one AUTOSTART=true></embed> + </td> + <td> + <embed WIDTH=240 HEIGHT=55 TYPE="audio/x-pn-realaudio" CONTROLS=InfoPanel CONSOLE=one AUTOSTART=true></embed> + </td> + </tr> + <tr> + <td COLSPAN=3> + <embed WIDTH=560 HEIGHT=16 TYPE="audio/x-pn-realaudio" CONTROLS=StatusBar CONSOLE=one AUTOSTART=true></embed> + </table> + <embed SRC="img_scale.smil" WIDTH=320 HEIGHT=240 TYPE="audio/x-pn-realaudio" CONTROLS=All CONSOLE=two AUTOSTART=true></embed> + </body> +</html> diff --git a/tests/excl_timings.smil b/tests/excl_timings.smil new file mode 100644 index 0000000..5e8f66e --- /dev/null +++ b/tests/excl_timings.smil @@ -0,0 +1,84 @@ +<smil> + <head> + <meta name="title" content="excl group test"/> + <layout> + <root-layout width="320" height="240" background-color="yellow"/> + <region id="reg_but1" left="5" top="15" width="80" height="30" background-color="red"/> + <region id="reg_but2" left="5" top="55" width="80" height="30" background-color="red"/> + <region id="reg_but3" left="5" top="95" width="80" height="30" background-color="red"/> + <region left="5" top="135" width="80" height="40"> + <region id="reg_text" left="5" top="0" width="70" height="18""/> + <region id="reg_ext" left="5" top="22" width="30" height="18""/> + <region id="reg_int" left="45" top="22" width="30" height="18"/> + </region> + <region id="reg_but4" left="5" top="185" width="80" height="30" background-color="red"/> + <region left="95" top="15" width="210" height="210" background-color="blue"> + <region id="reg_img" left="5" top="5" width="64" height="24" background-color="orange"/> + </region> + </layout> + </head> + <body> + <par end="but4.activateEvent"> + <text src="data:,Horizontal" id="but1" region="reg_but1" fill="freeze"> + <param name="fontColor" value="yellow"/> + <param name="fontSize" value="+1"/> + <param name="backgroundColor" value="blue"/> + </text> + <set targetElement="but1" attributeName="backgroundColor" to="red" begin="but1.activateEvent" dur="0.1"/> + <text src="data:,Vertical" id="but2" region="reg_but2" fill="freeze"> + <param name="fontColor" value="yellow"/> + <param name="fontSize" value="+1"/> + <param name="backgroundColor" value="blue"/> + </text> + <set targetElement="but2" attributeName="backgroundColor" to="red" begin="but2.activateEvent" dur="0.1"/> + <text src="data:,Diagonal" id="but3" region="reg_but3" fill="freeze"> + <param name="fontColor" value="yellow"/> + <param name="fontSize" value="+1"/> + <param name="backgroundColor" value="blue"/> + </text> + <set targetElement="but3" attributeName="backgroundColor" to="red" begin="but3.activateEvent" dur="0.1"/> + <text src="data:,Repeat" id="but_rep" region="reg_text" fill="freeze"> + <param name="backgroundColor" value="cyan"/> + </text> + <text src="data:,Ext" id="but_ext" region="reg_ext" fill="freeze"> + <param name="backgroundColor" value="green"/> + <param name="fontColor" value="white"/> + </text> + <text src="data:,Int" id="but_int" region="reg_int" fill="freeze"> + <param name="backgroundColor" value="green"/> + <param name="fontColor" value="white"/> + </text> + <excl> + <set targetElement="but_ext" attributeName="backgroundColor" to="red" + begin="0" dur="indefinite"/> + <set targetElement="but_ext" attributeName="backgroundColor" to="red" + begin="but_ext.activateEvent" dur="indefinite"/> + <set targetElement="but_int" attributeName="backgroundColor" to="red" + begin="but_int.activateEvent" dur="indefinite"/> + </excl> + <excl> + <set targetElement="vid" attributeName="src" to="img_scale_rep.smil" + begin="but_ext.activateEvent" dur="indefinite"/> + <set targetElement="vid" attributeName="src" to="img_scale.smil" + begin="but_int.activateEvent" dur="indefinite"/> + </excl> + <text src="data:,Stop" id="but4" region="reg_but4" fill="freeze"> + <param name="fontColor" value="green"/> + <param name="fontSize" value="+1"/> + <param name="backgroundColor" value="red"/> + </text> + <video src="img_scale_rep.smil" id="vid" region="reg_img" fill="freeze" fit="meet" repeatCount="indefinite"/> + <excl dur="indefinite"> + <animateMotion targetElement="reg_img" from="5,5" to="140,5" + begin="but1.activateEvent" dur="2" fill="freeze" + calcMode="spline" keySplines="0 .75 .25 1"/> + <animateMotion targetElement="reg_img" from="5,5" to="5,180" + begin="reg_but2.activateEvent" dur="2" fill="freeze" + calcMode="spline" keySplines="0.75 0 1 0.25"/> + <animateMotion targetElement="reg_img" from="5,5" to="140,180" + begin="reg_but3.activateEvent" dur="2" fill="freeze" + calcMode="spline" keySplines=".5 0 .5 1"/> + </excl> + </par> + </body> +</smil> diff --git a/tests/fade.rp b/tests/fade.rp new file mode 100644 index 0000000..160c582 --- /dev/null +++ b/tests/fade.rp @@ -0,0 +1,8 @@ +<imfl> + <head duration="10" width="320" height="240"/> + <image handle="1" name="../icons/hi128-app-kmplayer.png"/> + <fill start="0" color="yellow"/> + <fadein start="1" duration="1" target="1" dstx="96" dsty="56" + dstw="128" dsth="128"/> + <fadeout start="4" duration="1" color="yellow"/> +</imfl> diff --git a/tests/img_scale.smil b/tests/img_scale.smil new file mode 100644 index 0000000..1ae1c28 --- /dev/null +++ b/tests/img_scale.smil @@ -0,0 +1,27 @@ +<smil> + <head> + <layout> + <root-layout width="640" height="240" background-color="yellow"/> + <region id="reg_img1" left="5" top="15" width="150" height="210" background-color="red"/> + <region id="reg_img2" left="165" top="15" width="150" height="210" background-color="white"/> + <region id="reg_img3" left="325" top="15" width="150" height="210" background-color="blue"/> + <region id="reg_img4" left="485" top="15" width="150" height="210" background-color="orange"/> + </layout> + </head> + <body> + <par dur="2.5"> + <img src="../icons/hi128-app-kmplayer.png" region="reg_img1" fit="fill" fill="freeze"/> + <img src="../icons/hi128-app-kmplayer.png" region="reg_img2" fit="hidden" fill="freeze"/> + <img src="../icons/hi128-app-kmplayer.png" region="reg_img3" fit="meet" fill="freeze"/> + <img src="../icons/hi128-app-kmplayer.png" region="reg_img4" fit="slice" fill="freeze"/> + <set targetElement="reg_img1" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img2" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img3" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img4" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img1" attributeName="height" to="75" begin="1s" dur="1s"/> + <set targetElement="reg_img2" attributeName="height" to="75" begin="1s" dur="1s"/> + <set targetElement="reg_img3" attributeName="height" to="75" begin="1s" dur="1s"/> + <set targetElement="reg_img4" attributeName="height" to="75" begin="1s" dur="1s"/> + </par> + </body> +</smil> diff --git a/tests/img_scale_rep.smil b/tests/img_scale_rep.smil new file mode 100644 index 0000000..5a8d821 --- /dev/null +++ b/tests/img_scale_rep.smil @@ -0,0 +1,27 @@ +<smil> + <head> + <layout> + <root-layout width="640" height="240" background-color="yellow"/> + <region id="reg_img1" left="5" top="15" width="150" height="210" background-color="green"/> + <region id="reg_img2" left="165" top="15" width="150" height="210" background-color="grey"/> + <region id="reg_img3" left="325" top="15" width="150" height="210" background-color="yellow"/> + <region id="reg_img4" left="485" top="15" width="150" height="210" background-color="purple"/> + </layout> + </head> + <body> + <par dur="2.5" repeatCount="indefinite"> + <img src="../icons/hi64-app-kmplayer.png" region="reg_img1" fit="fill" fill="freeze"/> + <img src="../icons/hi64-app-kmplayer.png" region="reg_img2" fit="hidden" fill="freeze"/> + <img src="../icons/hi64-app-kmplayer.png" region="reg_img3" fit="meet" fill="freeze"/> + <img src="../icons/hi64-app-kmplayer.png" region="reg_img4" fit="slice" fill="freeze"/> + <set targetElement="reg_img1" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img2" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img3" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img4" attributeName="width" to="75" begin="0.5s" dur="1s"/> + <set targetElement="reg_img1" attributeName="height" to="75" begin="1s" dur="1s"/> + <set targetElement="reg_img2" attributeName="height" to="75" begin="1s" dur="1s"/> + <set targetElement="reg_img3" attributeName="height" to="75" begin="1s" dur="1s"/> + <set targetElement="reg_img4" attributeName="height" to="75" begin="1s" dur="1s"/> + </par> + </body> +</smil> diff --git a/tests/img_video_text.smil b/tests/img_video_text.smil new file mode 100644 index 0000000..cf1adcb --- /dev/null +++ b/tests/img_video_text.smil @@ -0,0 +1,32 @@ +<smil> + <head> + <layout> + <root-layout width="640" height="240"/> + <region id="reg_img" > + <region id="reg_text1" left="10%" top="25%" right="60%" bottom="25%"/> + <region id="reg_vid" left="55%" top="5%" right="5%" bottom="60%" background-color="DarkBlue"/> + <region id="reg_button1" left="446" top="202" width="130" height="26" z-index="2" background-color="LightGray"/> + <region id="reg_button2" left="446" top="202" width="132" height="28" z-index="1" background-color="DarkGray"/> + <region id="reg_text2" left="448" top="204" width="128" height="24" z-index="3"/> + </region> + </layout> + </head> + <body> + <par end="text2.activateEvent"> + <img src="../icons/hi128-app-kmplayer.png" region="reg_img" fit="fill" fill="freeze"/> + <text src="some_text.html" region="reg_text1" begin="3" dur="5"> + <param name="charset" value="iso-8859-1"/> + <param name="fontFace" value="System"/> + <param name="fontColor" value="yellow"/> + <param name="fontSize" value="+1"/> + <param name="backgroundColor" value="blue"/> + </text> + <video src="file:///home/koos/doc/example.avi" fit="meet" id="video1" region="reg_vid" begin="3"/> + <text src="data:,Stop" id="text2" region="reg_text2" fill="freeze"> + <param name="backgroundColor" value="gray"/> + </text> + <set targetElement="reg_button1" attributeName="background-color" to="DarkGray" begin="reg_text2.inBoundsEvent" end="reg_text2.outOfBoundsEvent"/> + <set targetElement="reg_button2" attributeName="background-color" to="LightGray" begin="reg_text2.inBoundsEvent" end="reg_text2.outOfBoundsEvent"/> + </par> + </body> +</smil> diff --git a/tests/nested_smil.smil b/tests/nested_smil.smil new file mode 100644 index 0000000..01f0417 --- /dev/null +++ b/tests/nested_smil.smil @@ -0,0 +1,25 @@ +<smil> + <head> + <layout> + <root-layout width="320" height="260"/> + <region id="nested_smil" left="0" top="0" right="0" height="240"/> + <region id="nested_but1" left="0" top="240" width="160" height="20" background-color="LightGray"/> + <region id="nested_but2" left="160" top="240" width="160" height="20" background-color="Orange"/> + </layout> + </head> + <body> + <par> + <excl> + <text src="data:,Start" id="text1" region="nested_but1" dur="indefinite" fill="freeze"> + </text> + <video src="excl_timings.smil" id="video1" region="nested_smil" begin="nested_but1.activateEvent"/> + </excl> + <text src="data:,Change%20Source" id="text2" region="nested_but2" dur="indefinite" fill="freeze"> + <param name="backgroundColor" value="orange"/> + <param name="fontColor" value="black"/> + </text> + <set target="video1" attribute="src" to="img_scale.smil" begin="nested_but2.activateEvent" dur="15"/> + <set target="text2" attribute="fontColor" to="gray" begin="nested_but2.activateEvent" dur="15"/> + </par> + </body> +</smil> diff --git a/tests/par_timings.smil b/tests/par_timings.smil new file mode 100644 index 0000000..f2f64f1 --- /dev/null +++ b/tests/par_timings.smil @@ -0,0 +1,37 @@ +<!-- test for timing for 'par' tags --> +<smil> + <head> + <layout> + <root-layout width="320" height="240" background-color="green"/> + <region id="region1" left="5%" top="10%" right="5%" bottom="50%" z-index="2"/> + <region id="region2" left="25%" top="60%" right="10%" bottom="5%" z-index="3" background-color="red"/> + <region id="region3" z-index="4"/> + </layout> + </head> + <body> + <par id="par1" end="text1.inBoundsEvent"> + <set target="par1" attribute="title" to="Mouse Inbound" fill="freeze"/> + <text id="text1" src="data:,par%20end%3Dtext1.inBoundsEvent%0D%0Atext%20dur%3Dindefinite%0D%0Amove%20here%20to%20end%20'par'" region="region1" dur="indefinite"/> + <text src="data:,dur%3D5s" region="region2" dur="5"/> + </par> + <par endsync="text2"> + <text id="text2" src="data:,par%20endsync%3Dtext2%0D%0Atext%20dur%3D7s" region="region1" dur="7s"/> + <text src="data:,dur%3D5" region="region2" dur="5"/> + </par> + <par dur="7s"> + <text src="data:,par%20dur%3D7s%0D%0Atext%20dur%3Dindefinite" region="region1" dur="indefinite"/> + <par begin="1"> + <text src="data:,nested%20par%20begin%3D1%0D%0Atext%20dur%3D5" region="region2" dur="5"/> + </par> + </par> + <par end="7s"> + <text src="data:,par%20end%3D7s%0D%0Atext%20dur%3Dindefinite" region="region1" dur="indefinite"/> + <text src="data:,dur%3D5" region="region2" dur="5"/> + </par> + <par> + <text src="data:,par%20no%20dur%20set%0D%0Atext%20dur%3D7" region="region1" dur="7"/> + <text src="data:,dur%3D5" region="region2" dur="5"/> + </par> + <text src="data:,that's%20all%20folks" title="Carrot time" region="region3" dur="2s" backgroundColor="black" fontColor="white"/> + </body> +</smil> diff --git a/tests/region_animate.smil b/tests/region_animate.smil new file mode 100644 index 0000000..699d5dc --- /dev/null +++ b/tests/region_animate.smil @@ -0,0 +1,40 @@ +<!-- test for moving a region with the animate element --> +<smil> + <head> + <layout> + <root-layout width="320" height="240" background-color="green"/> + <region id="region1" left="5%" top="10%" right="30%" bottom="50%" z-index="2"/> + <region id="region2" left="240" top="140" width="64" height="64" z-index="3" background-color="red"/> + <region id="region3" z-index="1"/> + </layout> + </head> + <body> + <par> + <text id="text1" src="data:,I'm%20a%20region" region="region1"> + <param name="fontColor" value="yellow"/> + <param name="fontPtSize" value="10"/> + <param name="backgroundColor" value="blue"/> + <animate target="text1" attributeName="fontPtSize" calcMode="discrete" values="10;12;14;16;18;20;22;24;26;28;300" begin="5" dur="6"/> + </text> + <img id="image1" src="../icons/hi48-app-kmplayer.png" region="region2" left="8"> + <animate target="region2" attributeName="background-color" values="red;white;blue" repeatCount="10" calcMode="discrete" dur="1.5"/> + </img> + <text src="data:,Move%20a%20region" region="region2" fill="freeze" top="48"> + <param name="fontPtSize" value="6"/> + </text> + <animate target="region2" attributeName="left" from="240" to="10" begin="5" dur="5"/> + </par> + <par> + <set target="region2" attributeName="z-index" to="6" fill="freeze"/> + <set target="region2" attributeName="left" to="20" fill="freeze"/> + <set target="region2" attributeName="width" to="200" fill="freeze"/> + <set target="region3" attributeName="background-color" to="black" fill="freeze"/> + <set target="region3" attributeName="z-index" to="5" fill="freeze"/> + <text src="data:,that's%20all%20folks" region="region2" dur="2"> + <param name="fontColor" value="green"/> + <param name="fontSize" value="+2"/> + <param name="backgroundColor" value="black"/> + </text> + </par> + </body> +</smil> diff --git a/tests/region_mouse_events.smil b/tests/region_mouse_events.smil new file mode 100644 index 0000000..8962c74 --- /dev/null +++ b/tests/region_mouse_events.smil @@ -0,0 +1,115 @@ +<!-- test for mouse events --> +<smil> + <head> + <layout> + <root-layout width="320" height="240" background-color="orange"/> + <region id="reg1" left="5%" top="10%" right="60%" bottom="50%" + background-color="blue"> + <region id="reg1_1" left="10%" top="30%" right="10%" bottom="30%"/> + </region> + <region id="reg2" left="60%" top="10%" right="5%" bottom="50%" + background-color="blue"> + <region id="reg2_1" left="5%" top="30%" right="10%" bottom="30%"/> + </region> + <region id="reg1_txt" left="5%" top="55%" width="15%" bottom="35%"/> + <region id="reg1_click" left="5%" top="65%" width="15%" bottom="25%" + background-color="red"/> + <region id="reg1_enter" left="5%" top="75%" width="15%" bottom="15%" + background-color="red"/> + <region id="reg1_leave" left="5%" top="85%" width="15%" bottom="5%" + background-color="red"/> + <region id="reg1_1_txt" left="25%" top="55%" width="15%" bottom="35%"/> + <region id="reg1_1_click" left="25%" top="65%" width="15%" bottom="25%" + background-color="red"/> + <region id="reg1_1_enter" left="25%" top="75%" width="15%" bottom="15%" + background-color="red"/> + <region id="reg1_1_leave" left="25%" top="85%" width="15%" bottom="5%" + background-color="red"/> + <region id="reg2_txt" left="60%" top="55%" width="15%" bottom="35%"/> + <region id="reg2_click" left="60%" top="65%" width="15%" bottom="25%" + background-color="red"/> + <region id="reg2_enter" left="60%" top="75%" width="15%" bottom="15%" + background-color="red"/> + <region id="reg2_leave" left="60%" top="85%" width="15%" bottom="5%" + background-color="red"/> + <region id="reg2_1_txt" left="80%" top="55%" width="15%" bottom="35%"/> + <region id="reg2_1_click" left="80%" top="65%" width="15%" bottom="25%" + background-color="red"/> + <region id="reg2_1_enter" left="80%" top="75%" width="15%" bottom="15%" + background-color="red"/> + <region id="reg2_1_leave" left="80%" top="85%" width="15%" bottom="5%" + background-color="red"/> + </layout> + </head> + <body> + <par dur="50"> + <text id="text1" src="data:,Opaque%20child" region="reg1_1" fill="freeze"> + <param name="backgroundColor" value="yellow"/> + </text> + <text id="text2" src="data:,Transparent%20child" region="reg2_1" + fill="freeze" sensitivity="transparent"> + <param name="backgroundColor" value="yellow"/> + </text> + <text src="data:,Outer" region="reg1_txt" fill="freeze" + rn:backgroundOpacity="0%"/> + <text id="text1_click" src="data:,Clicked" region="reg1_click" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text1_enter" src="data:,Entered" region="reg1_enter" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text1_leave" src="data:,Leaved" region="reg1_leave" + fill="freeze" rn:backgroundOpacity="0%"/> + <text src="data:,Inner" region="reg1_1_txt" fill="freeze" + rn:backgroundOpacity="0%"/> + <text id="text1_1_click" src="data:,Clicked" region="reg1_1_click" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text1_1_enter" src="data:,Entered" region="reg1_1_enter" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text1_1_leave" src="data:,Leaved" region="reg1_1_leave" + fill="freeze" rn:backgroundOpacity="0%"/> + <text src="data:,Outer" region="reg2_txt" fill="freeze" + rn:backgroundOpacity="0%"/> + <text id="text2_click" src="data:,Clicked" region="reg2_click" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text2_enter" src="data:,Entered" region="reg2_enter" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text2_leave" src="data:,Leaved" region="reg2_leave" + fill="freeze" rn:backgroundOpacity="0%"/> + <text src="data:,Inner" region="reg2_1_txt" fill="freeze" + rn:backgroundOpacity="0%"/> + <text id="text2_1_click" src="data:,Clicked" region="reg2_1_click" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text2_1_enter" src="data:,Entered" region="reg2_1_enter" + fill="freeze" rn:backgroundOpacity="0%"/> + <text id="text2_1_leave" src="data:,Leaved" region="reg2_1_leave" + fill="freeze" rn:backgroundOpacity="0%"/> + + <set target="reg1_click" attribute="background-color" to="green" + begin="reg1.activateEvent" dur="1"/> + <set target="reg1_enter" attribute="background-color" to="green" + begin="reg1.inBoundsEvent" end="reg1.outOfBoundsEvent"/> + <set target="reg1_leave" attribute="background-color" to="green" + end="reg1.inBoundsEvent" begin="reg1.outOfBoundsEvent"/> + + <set target="reg1_1_click" attribute="background-color" to="green" + begin="reg1_1.activateEvent" dur="1"/> + <set target="reg1_1_enter" attribute="background-color" to="green" + begin="reg1_1.inBoundsEvent" end="reg1_1.outOfBoundsEvent"/> + <set target="reg1_1_leave" attribute="background-color" to="green" + end="reg1_1.inBoundsEvent" begin="reg1_1.outOfBoundsEvent"/> + + <set target="reg2_click" attribute="background-color" to="green" + begin="reg2.activateEvent" dur="1"/> + <set target="reg2_enter" attribute="background-color" to="green" + begin="reg2.inBoundsEvent" end="reg2.outOfBoundsEvent"/> + <set target="reg2_leave" attribute="background-color" to="green" + end="reg2.inBoundsEvent" begin="reg2.outOfBoundsEvent"/> + + <set target="reg2_1_click" attribute="background-color" to="green" + begin="reg2_1.activateEvent" dur="1"/> + <set target="reg2_1_enter" attribute="background-color" to="green" + begin="reg2_1.inBoundsEvent" end="reg2_1.outOfBoundsEvent"/> + <set target="reg2_1_leave" attribute="background-color" to="green" + end="reg2_1.inBoundsEvent" begin="reg2_1.outOfBoundsEvent"/> + </par> + </body> +</smil> diff --git a/tests/regpoint.smil b/tests/regpoint.smil new file mode 100644 index 0000000..0b36c73 --- /dev/null +++ b/tests/regpoint.smil @@ -0,0 +1,53 @@ +<smil> + <head> + <layout> + <region id="img1" left="0" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img2" left="50" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img3" left="100" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img4" left="150" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img5" left="200" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img6" left="250" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img7" left="300" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img8" left="350" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img9" left="400" top="5" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img10" left="0" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img11" left="50" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img12" left="100" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img13" left="150" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img14" left="200" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img15" left="250" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img16" left="300" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img17" left="350" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="img18" left="400" top="55" width="48" height="48" background-color="blue" z-index="2" /> + <region id="region_end" z-index="1"/> + <regPoint id="north_north_west" top="20" left="40"/> + <regPoint id="north_west" top="20" left="20" regAlign="midLeft"/> + <root-layout background-color="white" width="450" height="240"/> + </layout> + </head> + <body> + <par dur="10"> + <img src="../icons/hi48-app-kmplayer.png" region="img1" regPoint="center" regAlign="topLeft" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img2" regPoint="center" regAlign="midLeft" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img3" regPoint="center" regAlign="bottomLeft" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img4" regPoint="center" regAlign="topMid" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img5" regPoint="center" regAlign="center" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img6" regPoint="center" regAlign="bottomMid" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img7" regPoint="center" regAlign="topRight" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img8" regPoint="center" regAlign="midRight" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img9" regPoint="center" regAlign="bottomRight" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img10" regPoint="north_north_west" regAlign="topLeft" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img11" regPoint="north_west" fill="freeze"/> + <img src="../icons/hi48-app-kmplayer.png" region="img12" regPoint="north_west" regAlign="topLeft" fill="freeze"/> + </par> + <par> + <set target="region_end" attributeName="background-color" to="black" fill="freeze"/> + <set target="region_end" attributeName="z-index" to="3" fill="freeze"/> + <text src="data:,that's%20all%20folks" region="region_end" dur="2" left="20%" top="40%"> + <param name="fontColor" value="green"/> + <param name="fontSize" value="+2"/> + <param name="backgroundColor" value="black"/> + </text> + </par> + </body> +</smil> diff --git a/tests/rp.smil b/tests/rp.smil new file mode 100644 index 0000000..7364a06 --- /dev/null +++ b/tests/rp.smil @@ -0,0 +1,13 @@ +<smil> + <head> + <layout> + <root-layout width="320" height="240" background-color="red"/> + <region left="5" top="15" width="160" height="120" background-color="blue"> + <region id="img1" left="5" top="5" right="5" bottom="5"/> + </region> + </layout> + </head> + <body> + <img region="img1" fit="meet" src="fade.rp"/> + </body> +</smil> diff --git a/tests/smil_files.m3u b/tests/smil_files.m3u new file mode 100644 index 0000000..b58fb0c --- /dev/null +++ b/tests/smil_files.m3u @@ -0,0 +1,6 @@ +excl_timings.smil +img_scale.smil +img_video_text.smil +par_timings.smil +region_animate.smil +region_mouse_events.smil diff --git a/tests/some_text.html b/tests/some_text.html new file mode 100644 index 0000000..a960054 --- /dev/null +++ b/tests/some_text.html @@ -0,0 +1,6 @@ +<html> + <body> + <h1>Title</h1> + Some <font color="red">text</font> for <b>reading</b> + </body> +</html> diff --git a/tests/text.smil b/tests/text.smil new file mode 100644 index 0000000..901a126 --- /dev/null +++ b/tests/text.smil @@ -0,0 +1,40 @@ +<!-- test for moving a region with the animate element --> +<smil> + <head> + <layout> + <root-layout width="640" height="480" background-color="green"/> + <region id="region1" left="7%" top="10%" width="24%" height="10%" z-index="1" background-color="pink" showBackground="whenActive"/> + <region id="region2" left="38%" top="10%" width="24%" height="10%" z-index="2" background-color="yellow" showBackground="whenActive"/> + <region id="region3" left="69%" top="10%" width="24%" height="10%" z-index="3" background-color="cyan" showBackground="whenActive"/> + <region id="region4" left="25%" top="10%" width="50%" height="80%" z-index="4"/> + </layout> + </head> + <body> + <par dur="5"> + <text id="text1" src="data:,Left Align" region="region1"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="12"/> + </text> + <text id="text2" src="data:,Center Align" region="region2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="12"/> + <param name="hAlign" value="center"/> + </text> + <text id="text3" src="data:,Right Align" region="region3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="12"/> + <param name="hAlign" value="right"/> + </text> + <animate target="region1" attributeName="left" from="7%" to="69%" begin="2" dur="1.5" fill="freeze"/> + <animate target="region3" attributeName="left" from="69%" to="7%" begin="2" dur="1.5" fill="freeze"/> + <animate target="text3" attributeName="top" from="0%" to="-50%" begin="3.5" dur="1.5" fill="freeze"/> + </par> + <par dur="5"> + <text id="text4" src="chapter2.txt" region="region4"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="11"/> + </text> + <animate target="text4" attributeName="top" from="0%" to="-170%" begin=".5" dur="4" fill="freeze"/> + </par> + </body> +</smil> diff --git a/tests/timings.smil b/tests/timings.smil new file mode 100644 index 0000000..3db0120 --- /dev/null +++ b/tests/timings.smil @@ -0,0 +1,57 @@ +<smil> + <head> + <layout> + <root-layout width="320" height="240"/> + <region id="reg1" left="5%" right="5%" top="5%" height="10%"/> + <region id="reg2" left="5%" right="5%" top="25%" height="10%"/> + <region id="reg3" left="5%" right="5%" top="45%" height="10%"/> + <region left="5%" right="5%" bottom="5%" height="10%" + background-color="gray"> + <region id="but_rec" left="10%" width="30%" /> + <region id="but_dep" right="10%" width="30%" /> + </region> + </layout> + </head> + <body> + <par> + <a href="#rec"> + <text id="rec_txt" src="data:,Recommended" region="but_rec" + fill="freeze"/> + </a> + <a href="#dep"> + <text id="dep_txt" src="data:,Deprecated" region="but_dep" + fill="freeze"/> + </a> + <seq> + <par id="rec"> + <text id="rtext1" src="data:,id=rtext1%20begin=2%20dur=2" + region="reg1" begin="2" dur="2"/> + <text src="data:,begin=rtext1.begin+1%20dur=2" region="reg2" + begin="rtext1.begin +1" dur="2"/> + <text src="data:,begin=rtext1.end%20dur=2" region="reg3" + begin="rtext1.end" dur="2"/> + <set target="rec_txt" attribute="background-color" to="green" + fill="freeze"/> + <set target="reg1" attribute="background-color" to="pink" + fill="freeze"/> + <set target="reg2" attribute="background-color" to="pink" + fill="freeze"/> + <set target="reg3" attribute="background-color" to="pink" + fill="freeze"/> + </par> + <par id="dep"> + <text id="dtext1" src="data:,id=dtext1%20begin=2%20dur=2" + region="reg1" begin="2" dur="2"/> + <text src="data:,id(dtext1)(1)" region="reg2" + begin="id(dtext1)(1)" dur="2"/> + <set target="dep_txt" attribute="background-color" to="green" + fill="freeze"/> + <set target="reg1" attribute="background-color" to="red" + fill="freeze"/> + <set target="reg2" attribute="background-color" to="red" + fill="freeze"/> + </par> + </seq> + </par> + </body> +</smil> diff --git a/tests/transition.smil b/tests/transition.smil new file mode 100644 index 0000000..3f35fff --- /dev/null +++ b/tests/transition.smil @@ -0,0 +1,181 @@ +<smil> + <head> + <layout> + <root-layout width="160" height="120" background-color="green"/> + <region id="region1" left="25%" top="10%" right="25%" bottom="30%"/> + <region id="region2" left="5%" top="75%" right="5%" bottom="5%" + background-color="white"/> + <region id="region3" z-index="2"/> + </layout> + <transition id="pushwipe1" dur="1" subtype="fromTop" type="pushWipe"/> + <transition id="pushwipe2" dur="1" subtype="fromBottom" type="pushWipe"/> + <transition id="iriswipe1" dur="1" type="irisWipe"/> + <transition id="iriswipe2" dur="1" subtype="diamond" type="irisWipe"/> + <transition id="barwipe1" dur="1" type="barWipe"/> + <transition id="barwipe2" dur="1" direction="reverse" type="barWipe"/> + <transition id="barwipe4" dur="1" type="barWipe" + startProgress=".4" endProgress="0.6"/> + <transition id="barwipe5" dur="1" type="barWipe" endProgress="0.5"/> + <transition id="barwipe3" dur="0.3" type="barWipe"/> + <transition id="clockwipe1" dur="1" type="clockWipe"/> + <transition id="clockwipe2" dur="1" type="clockWipe" + subtype="clockwiseThree" direction="reverse"/> + <transition id="bowtiewipe1" dur="1" type="bowTieWipe"/> + <transition id="bowtiewipe2" dur="1" type="bowTieWipe" subtype="horizontal"/> + <transition id="ellipsewipe1" dur="1" type="ellipseWipe"/> + <transition id="ellipsewipe2" dur="1" type="ellipseWipe" + subtype="vertical"/> + <transition id="fade1" dur="1" type="fade"/> + <transition id="fade2" dur="0.3" type="fade"/> + </head> + <body> + <seq> + <brush region="region3" dur="1.5" color="gray" transOut="ellipsewipe1" /> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="bowtiewipe1" transOut="bowtiewipe2" fit="tile"/> + <seq> + <text src="data:,bowTieWipe%20vertical" region="region2" + dur="1.5" transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,bowTieWipe%20horizontal" + region="region2" dur="1.5" transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="clockwipe1" transOut="clockwipe2"/> + <seq> + <text src="data:,clockWipe%20clockwiseTwelve" region="region2" + dur="1.5" transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,clockWipe%20clockwiseThree%20reversed" + region="region2" dur="1.5" transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="pushwipe1" transOut="pushwipe2"/> + <seq> + <text src="data:,pushWipe%20fromTop" region="region2" dur="1.5" + transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,pushWipe%20fromBottom" region="region2" dur="1.5" + transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="iriswipe1" transOut="iriswipe2"/> + <seq> + <text src="data:,irishWipe%20rectangle" region="region2" dur="1.5" + transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,irishWipe%20diamond" region="region2" dur="1.5" + transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="barwipe1" transOut="barwipe2"/> + <seq> + <text src="data:,barWipe%20leftToRight" region="region2" dur="1.5" + transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,irishWipe%20leftToRight%20reversed" + region="region2" dur="1.5" transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="barwipe4" transOut="barwipe5"/> + <seq> + <text src="data:,barWipe%20leftToRight%2040-60" region="region2" + dur="1.5" transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,irishWipe%20leftToRight%200-50%20reversed" + region="region2" dur="1.5" transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="fade1" transOut="fade1"/> + <seq> + <text src="data:,fade" region="region2" dur="1.5" + transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,fade" region="region2" dur="1.5" + transIn="fade2" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <img src="../icons/hi64-app-kmplayer.png" dur="3" region="region1" + transIn="ellipsewipe1" transOut="ellipsewipe2"/> + <seq> + <text src="data:,ellipseWipe%20vertical" region="region2" + dur="1.5" transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,ellipseWipe%20vertical" + region="region2" dur="1.5" transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <par> + <video src="rp.smil" dur="6" region="region1" fit="meet" + transIn="clockwipe1" transOut="ellipsewipe1"/> + <seq> + <text src="data:,nested rp.smil%20clockWipe" region="region2" + dur="3" transIn="fade2" transOut="barwipe3"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + <text src="data:,ellipseWipe%20circle" + region="region2" dur="3" transIn="barwipe3" transOut="fade2"> + <param name="fontColor" value="blue"/> + <param name="fontPtSize" value="10"/> + </text> + </seq> + </par> + <brush region="region3" dur="2" color="gray" transIn="ellipsewipe1" /> + </seq> + </body> +</smil> |