20111014 mu me_html5

27
Multimedia HTML5 Erik Duval Dept. Computerwetenschappen http://www.cs.kuleuven.ac.be/~erikd/

Upload: erik-duval

Post on 01-Jul-2015

508 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: 20111014 mu me_html5

Multimedia

HTML5

Erik DuvalDept. Computerwetenschappen

http://www.cs.kuleuven.ac.be/~erikd/

Page 3: 20111014 mu me_html5

wat denken jullie?

3

Page 4: 20111014 mu me_html5

4

http://www.w3.org/TR/html5/

Page 5: 20111014 mu me_html5

“flash assassin”

5

Page 6: 20111014 mu me_html5
Page 7: 20111014 mu me_html5

7

http://www.apple.com/html5/

Page 8: 20111014 mu me_html5

html5

• work-in-progress

• ‘most modern browsers some support’

8

Page 9: 20111014 mu me_html5

9

Page 10: 20111014 mu me_html5

10

Page 11: 20111014 mu me_html5

11

Page 12: 20111014 mu me_html5

<!DOCTYPE html><html><body>

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">

Your browser does not support the canvas element.

</canvas>

<script type="text/javascript">

var c=document.getElementById("myCanvas");

var cxt=c.getContext("2d");

cxt.fillStyle="#FF0000";

cxt.fillRect(0,0,150,75);

</script></body></html> 12

Page 13: 20111014 mu me_html5

<script type="text/javascript">

var c=document.getElementById("myCanvas");

var cxt=c.getContext("2d");

cxt.moveTo(10,10);

cxt.lineTo(150,50);

cxt.lineTo(10,50);

cxt.stroke();

</script>

13

Page 14: 20111014 mu me_html5

<script type="text/javascript">

var c=document.getElementById("myCanvas");

var cxt=c.getContext("2d");

cxt.fillStyle="#FF0000";

cxt.beginPath();

cxt.arc(70,18,15,0,Math.PI*2,true);

cxt.closePath();

cxt.fill();

</script>14

Page 15: 20111014 mu me_html5

<script type="text/javascript">

var c=document.getElementById("myCanvas");

var cxt=c.getContext("2d");

var img=new Image();

img.src="img_flwr.png";

cxt.drawImage(img,0,0);

</script>

15

Page 16: 20111014 mu me_html5

<!DOCTYPE html>

<html>

<body>

<audio controls="controls">

<source src="song.ogg" type="audio/ogg" />

<source src="song.mp3" type="audio/mpeg" />

Your browser does not support the audio element.

</audio>

</body>

</html>16

Page 17: 20111014 mu me_html5

<audio>

17

Page 18: 20111014 mu me_html5

<video><!DOCTYPE html><html><body>

<video 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>18

Page 19: 20111014 mu me_html5

• zonder plug-in (flash)

19

Page 20: 20111014 mu me_html5

20

http://www.youtube.com/html5

Page 21: 20111014 mu me_html5

21

Page 22: 20111014 mu me_html5

22

<script type="text/javascript">if (localStorage.n) { localStorage.n=Number(localStorage.n) +1; }else { localStorage.n=1; }document.write("Visits: " + localStorage.n + " time(s).");</script>

<p>Refresh the page to see the counter increase.</p><p>Close the browser window, and try again, and the counter will continue.</p>

Page 24: 20111014 mu me_html5

24

http://thewildernessdowntown.com/

Page 25: 20111014 mu me_html5

25

Page 27: 20111014 mu me_html5

27

Questions?

http://erikduval.wordpress.com/twitter: @ErikDuval