Symbian-Developers

The Official Developers Section => Symbian Software Development Discussions => The Developers Section => Symbian Web Runtime => Topic started by: Allstar12345 on September 03, 2012, 06:46:25 pm

Title: HTML5 examples for WRT
Post by: Allstar12345 on September 03, 2012, 06:46:25 pm
i cant guarantee that these will work due to Symbian having one hell of a bad browser.. but the recent Refresh and Fp1, Fp2 browsers have improved html5 a bit.

video playback

Code: [Select]
<!DOCTYPE html>
<html>
<body>

<video width="320" height="240" controls="controls" autoplay="autoplay">
  <source src="movie.mp4" type="video/mp4" />
  <source src="movie.ogg" type="video/ogg" />
  <source src="movie.webm" type="video/webm" />
Your browser does not support the video tag.
</video>

</body>
</html>


draw inside Canvas

Code: [Select]
<!DOCTYPE html>
<html>
<body>

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
Your browser does not support the HTML5 canvas tag.
</canvas>

<script type="text/javascript">

var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.fillStyle="#FF0000";
ctx.fillRect(0,0,150,75);

</script>

</body>
</html>