SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The HTML5 Canvas Element
Apostolos Syropoulos
Xanthi, Greece
asyropoulos@yahoo.com
The Canvas Element for members of the
Erasmus+ founded project GAMES
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Presentation Outline
1 What is the Canvas Element?
2 Simple Example
3 Playing with Videos
4 Finale
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Why this all this fuss?
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Why this all this fuss?
The canvas element together with the audio and video elements
are the things that make HTML5 shine!
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Why this all this fuss?
The canvas element together with the audio and video elements
are the things that make HTML5 shine!
Canvas has many applications: interactive movies, games, charts,
diagrams, etc.
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Why this all this fuss?
The canvas element together with the audio and video elements
are the things that make HTML5 shine!
Canvas has many applications: interactive movies, games, charts,
diagrams, etc.
One can create whole sites with canvas but this is something
most people do not recommend.
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Why this all this fuss?
The canvas element together with the audio and video elements
are the things that make HTML5 shine!
Canvas has many applications: interactive movies, games, charts,
diagrams, etc.
One can create whole sites with canvas but this is something
most people do not recommend.
There is no need to use Flash and Action Script anymore!
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Why this all this fuss?
The canvas element together with the audio and video elements
are the things that make HTML5 shine!
Canvas has many applications: interactive movies, games, charts,
diagrams, etc.
One can create whole sites with canvas but this is something
most people do not recommend.
There is no need to use Flash and Action Script anymore!
Canvas is free as it is natively supported by all major browsers!
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Why this all this fuss?
The canvas element together with the audio and video elements
are the things that make HTML5 shine!
Canvas has many applications: interactive movies, games, charts,
diagrams, etc.
One can create whole sites with canvas but this is something
most people do not recommend.
There is no need to use Flash and Action Script anymore!
Canvas is free as it is natively supported by all major browsers!
Canvas is for 2D graphics for 3D graphics we need WebGL:
http://arodic.github.io/p/jellyfish/
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Checking for support
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Checking for support
<canvas>
Your browser doesn't support "canvas".
</canvas>
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Checking for support
<canvas>
Your browser doesn't support "canvas".
</canvas>
The problem with this approach is that one cannot do anything if
the element is not supported!
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Checking for support
<canvas>
Your browser doesn't support "canvas".
</canvas>
The problem with this approach is that one cannot do anything if
the element is not supported!
However, we live in 2018 and all major browsers support this
element!
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Simplest Example
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Simplest Example
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title>Canvas Example</title>
</head> <body>
<canvas id="canvas1" width="200" height="200">
Your browser doesn't support "canvas".</canvas>
<script>
var can = document.getElementById('canvas1');
var ctx = can.getContext('2d');
ctx.beginPath()
ctx.moveTo(100,10); ctx.lineTo(150,140);
ctx.lineTo(60,110); ctx.closePath();
ctx.fillStyle = 'lime'; ctx.strokeStyle = 'purple';
ctx.lineWidth = 4; ctx.fill(); ctx.stroke();
</script></body></html>
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Output of the Example
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Output of the Example
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The <video> element revisited
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The <video> element revisited
One can embed videos in web pages as we already know.
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The <video> element revisited
One can embed videos in web pages as we already know.
<video id="myVideo" width="720" height = "404">
<source src="sample-video.webm" type="video/webm">
<track src="sample-video.vtt" label="Greek
subtitles"
kind="subtitles" srclang="el" default></track>
</video>
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The <video> element revisited
One can embed videos in web pages as we already know.
<video id="myVideo" width="720" height = "404">
<source src="sample-video.webm" type="video/webm">
<track src="sample-video.vtt" label="Greek
subtitles"
kind="subtitles" srclang="el" default></track>
</video>
This contains subtitles! And to make it autostart:
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The <video> element revisited
One can embed videos in web pages as we already know.
<video id="myVideo" width="720" height = "404">
<source src="sample-video.webm" type="video/webm">
<track src="sample-video.vtt" label="Greek
subtitles"
kind="subtitles" srclang="el" default></track>
</video>
This contains subtitles! And to make it autostart:
<script>
var video = document.getElementById("myVideo");
video.autoplay = true;
video.load();
</script>
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A <video> over a <canvas>
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A <video> over a <canvas>
When specifying a <video> element and a <canvas> element,
then the video is reproduced on the canvas.
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
A <video> over a <canvas>
When specifying a <video> element and a <canvas> element,
then the video is reproduced on the canvas.
Let us see an example.
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Simple animation with JavaScript
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Simple animation with JavaScript
A ball that follows the mouse.
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Simple animation with JavaScript
A ball that follows the mouse.
A bouncing ball.
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Animation Libraries
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Animation Libraries
https://www.createjs.com/easeljs
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Animation Libraries
https://www.createjs.com/easeljs
http://phaser.io/
The HTML5
Canvas Element
Syropoulos
What is the
Canvas Element?
Simple Example
Playing with
Videos
Finale
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Finale
Thank you very much for your attention!

Weitere ähnliche Inhalte

Ähnlich wie The HTML5 Canvas Element

HTML5: Are We There Yet?
HTML5: Are We There Yet?HTML5: Are We There Yet?
HTML5: Are We There Yet?Judy Unrein
 
Bringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile DevicesBringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile DevicesBrian Crescimanno
 
Inserting Video in Dreamweaver (Using Plugin)
Inserting Video in Dreamweaver (Using Plugin)Inserting Video in Dreamweaver (Using Plugin)
Inserting Video in Dreamweaver (Using Plugin)Gabrielle Burey
 
Georgia Tech hacking Accessibility
Georgia Tech hacking AccessibilityGeorgia Tech hacking Accessibility
Georgia Tech hacking AccessibilityChristian Heilmann
 
Targeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & NativeTargeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & NativeEric Fickes
 
Replacing flash with HTML5 and CSS3
Replacing flash with HTML5 and CSS3Replacing flash with HTML5 and CSS3
Replacing flash with HTML5 and CSS3Saurabh Kheni
 
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schillerscottschiller
 
By VISY - ""In the country of the blind, the one-eyed man is king""
By VISY - ""In the country of the blind, the one-eyed man is king""By VISY - ""In the country of the blind, the one-eyed man is king""
By VISY - ""In the country of the blind, the one-eyed man is king""Tobias Leingruber
 
Wds leanengineering-141103233017-conversion-gate02
Wds leanengineering-141103233017-conversion-gate02Wds leanengineering-141103233017-conversion-gate02
Wds leanengineering-141103233017-conversion-gate02Shivam Prajapati
 
Drupal Video Presentation
Drupal Video PresentationDrupal Video Presentation
Drupal Video PresentationEric Michalsen
 
Graphical Animation - Flash Introduction
Graphical Animation - Flash IntroductionGraphical Animation - Flash Introduction
Graphical Animation - Flash IntroductionJamie Hutt
 
Html5 - audio and video tags
Html5 - audio and video tagsHtml5 - audio and video tags
Html5 - audio and video tagsRae Allen
 
Mobile Meow at Mobilism
Mobile Meow at MobilismMobile Meow at Mobilism
Mobile Meow at MobilismGreg Schechter
 

Ähnlich wie The HTML5 Canvas Element (20)

HTML5: Are We There Yet?
HTML5: Are We There Yet?HTML5: Are We There Yet?
HTML5: Are We There Yet?
 
Bringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile DevicesBringing HTML5 Video to Mobile Devices
Bringing HTML5 Video to Mobile Devices
 
Animation ict
Animation ictAnimation ict
Animation ict
 
Inserting Video in Dreamweaver (Using Plugin)
Inserting Video in Dreamweaver (Using Plugin)Inserting Video in Dreamweaver (Using Plugin)
Inserting Video in Dreamweaver (Using Plugin)
 
Motion graphics evaluation
Motion graphics evaluationMotion graphics evaluation
Motion graphics evaluation
 
Motion graphics article
Motion graphics articleMotion graphics article
Motion graphics article
 
Georgia Tech hacking Accessibility
Georgia Tech hacking AccessibilityGeorgia Tech hacking Accessibility
Georgia Tech hacking Accessibility
 
Targeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & NativeTargeting Screens with HTML5, Flash & Native
Targeting Screens with HTML5, Flash & Native
 
Replacing flash with HTML5 and CSS3
Replacing flash with HTML5 and CSS3Replacing flash with HTML5 and CSS3
Replacing flash with HTML5 and CSS3
 
JS Days Mobile Meow
JS Days Mobile MeowJS Days Mobile Meow
JS Days Mobile Meow
 
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
 
By VISY - ""In the country of the blind, the one-eyed man is king""
By VISY - ""In the country of the blind, the one-eyed man is king""By VISY - ""In the country of the blind, the one-eyed man is king""
By VISY - ""In the country of the blind, the one-eyed man is king""
 
Web DU Mobile Meow
Web DU Mobile MeowWeb DU Mobile Meow
Web DU Mobile Meow
 
Snagit by Techsmith
Snagit by TechsmithSnagit by Techsmith
Snagit by Techsmith
 
Wds leanengineering-141103233017-conversion-gate02
Wds leanengineering-141103233017-conversion-gate02Wds leanengineering-141103233017-conversion-gate02
Wds leanengineering-141103233017-conversion-gate02
 
Php2pdf
Php2pdfPhp2pdf
Php2pdf
 
Drupal Video Presentation
Drupal Video PresentationDrupal Video Presentation
Drupal Video Presentation
 
Graphical Animation - Flash Introduction
Graphical Animation - Flash IntroductionGraphical Animation - Flash Introduction
Graphical Animation - Flash Introduction
 
Html5 - audio and video tags
Html5 - audio and video tagsHtml5 - audio and video tags
Html5 - audio and video tags
 
Mobile Meow at Mobilism
Mobile Meow at MobilismMobile Meow at Mobilism
Mobile Meow at Mobilism
 

Mehr von Apostolos Syropoulos

A Presentation of Braga. It was made by students of school
A Presentation of Braga. It was made by students of schoolA Presentation of Braga. It was made by students of school
A Presentation of Braga. It was made by students of schoolApostolos Syropoulos
 
A short presentation of Italy made by students of a school in Cosimo, Sicily,...
A short presentation of Italy made by students of a school in Cosimo, Sicily,...A short presentation of Italy made by students of a school in Cosimo, Sicily,...
A short presentation of Italy made by students of a school in Cosimo, Sicily,...Apostolos Syropoulos
 
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ ProjectSocial Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ ProjectApostolos Syropoulos
 
A gentle introduction to Artificial Intelligence
A gentle introduction to Artificial IntelligenceA gentle introduction to Artificial Intelligence
A gentle introduction to Artificial IntelligenceApostolos Syropoulos
 
ΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu Mansion
ΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu MansionΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu Mansion
ΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu MansionApostolos Syropoulos
 
Το Ορφανοτροφείο Θηλέων Ξάνθης
Το Ορφανοτροφείο Θηλέων ΞάνθηςΤο Ορφανοτροφείο Θηλέων Ξάνθης
Το Ορφανοτροφείο Θηλέων ΞάνθηςApostolos Syropoulos
 
Το Αρχαιολογικό Μουσείο Αβδήρων
Το Αρχαιολογικό Μουσείο ΑβδήρωνΤο Αρχαιολογικό Μουσείο Αβδήρων
Το Αρχαιολογικό Μουσείο ΑβδήρωνApostolos Syropoulos
 
Ταφικά έθιμα στα αρχαία Άβδηρα
Ταφικά έθιμα στα αρχαία ΆβδηραΤαφικά έθιμα στα αρχαία Άβδηρα
Ταφικά έθιμα στα αρχαία ΆβδηραApostolos Syropoulos
 
Το ορφανοτροφείο της Ξάνθης
Το ορφανοτροφείο της ΞάνθηςΤο ορφανοτροφείο της Ξάνθης
Το ορφανοτροφείο της ΞάνθηςApostolos Syropoulos
 
Μικρασιατική κατατστροφή - Μέρος 3
Μικρασιατική κατατστροφή - Μέρος 3Μικρασιατική κατατστροφή - Μέρος 3
Μικρασιατική κατατστροφή - Μέρος 3Apostolos Syropoulos
 
Μικρασιατική κατατστροφή - Μέρος 2
Μικρασιατική κατατστροφή - Μέρος 2Μικρασιατική κατατστροφή - Μέρος 2
Μικρασιατική κατατστροφή - Μέρος 2Apostolos Syropoulos
 
Αφιέρωμα στη Μικρά Ασία
Αφιέρωμα στη Μικρά ΑσίαΑφιέρωμα στη Μικρά Ασία
Αφιέρωμα στη Μικρά ΑσίαApostolos Syropoulos
 
ΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptx
ΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptxΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptx
ΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptxApostolos Syropoulos
 
Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing mathematical tex...
Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing  mathematical tex...Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing  mathematical tex...
Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing mathematical tex...Apostolos Syropoulos
 
Inflected Forms of Nouns and Adjectives
Inflected Forms of Nouns and AdjectivesInflected Forms of Nouns and Adjectives
Inflected Forms of Nouns and AdjectivesApostolos Syropoulos
 
Computational Thinking and...the Greek Alphabet
Computational Thinking and...the Greek AlphabetComputational Thinking and...the Greek Alphabet
Computational Thinking and...the Greek AlphabetApostolos Syropoulos
 
Το Αποτύπωμα του 1821 στον Τόπο μου
Το Αποτύπωμα του 1821 στον Τόπο μουΤο Αποτύπωμα του 1821 στον Τόπο μου
Το Αποτύπωμα του 1821 στον Τόπο μουApostolos Syropoulos
 
Παγκόσμια ημέρα της σταθεράς π=3,14...
Παγκόσμια ημέρα της σταθεράς π=3,14...Παγκόσμια ημέρα της σταθεράς π=3,14...
Παγκόσμια ημέρα της σταθεράς π=3,14...Apostolos Syropoulos
 

Mehr von Apostolos Syropoulos (20)

A Presentation of Braga. It was made by students of school
A Presentation of Braga. It was made by students of schoolA Presentation of Braga. It was made by students of school
A Presentation of Braga. It was made by students of school
 
A short presentation of Italy made by students of a school in Cosimo, Sicily,...
A short presentation of Italy made by students of a school in Cosimo, Sicily,...A short presentation of Italy made by students of a school in Cosimo, Sicily,...
A short presentation of Italy made by students of a school in Cosimo, Sicily,...
 
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ ProjectSocial Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
 
A gentle introduction to Artificial Intelligence
A gentle introduction to Artificial IntelligenceA gentle introduction to Artificial Intelligence
A gentle introduction to Artificial Intelligence
 
ΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu Mansion
ΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu MansionΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu Mansion
ΑΡΧΟΝΤΙΚΟ ΠΑΜΟΥΚΤΣΟΓΛΟΥ - Pamouktsoglu Mansion
 
Το Ορφανοτροφείο Θηλέων Ξάνθης
Το Ορφανοτροφείο Θηλέων ΞάνθηςΤο Ορφανοτροφείο Θηλέων Ξάνθης
Το Ορφανοτροφείο Θηλέων Ξάνθης
 
Το Αρχαιολογικό Μουσείο Αβδήρων
Το Αρχαιολογικό Μουσείο ΑβδήρωνΤο Αρχαιολογικό Μουσείο Αβδήρων
Το Αρχαιολογικό Μουσείο Αβδήρων
 
Ταφικά έθιμα στα αρχαία Άβδηρα
Ταφικά έθιμα στα αρχαία ΆβδηραΤαφικά έθιμα στα αρχαία Άβδηρα
Ταφικά έθιμα στα αρχαία Άβδηρα
 
Το ορφανοτροφείο της Ξάνθης
Το ορφανοτροφείο της ΞάνθηςΤο ορφανοτροφείο της Ξάνθης
Το ορφανοτροφείο της Ξάνθης
 
Μικρασιατική κατατστροφή - Μέρος 3
Μικρασιατική κατατστροφή - Μέρος 3Μικρασιατική κατατστροφή - Μέρος 3
Μικρασιατική κατατστροφή - Μέρος 3
 
Μικρασιατική κατατστροφή - Μέρος 2
Μικρασιατική κατατστροφή - Μέρος 2Μικρασιατική κατατστροφή - Μέρος 2
Μικρασιατική κατατστροφή - Μέρος 2
 
Αφιέρωμα στη Μικρά Ασία
Αφιέρωμα στη Μικρά ΑσίαΑφιέρωμα στη Μικρά Ασία
Αφιέρωμα στη Μικρά Ασία
 
ΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptx
ΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptxΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptx
ΕΚΠΑΙΔΕΥΤΙΚΗ ΔΡΑΣΗ «ΙΧΝΙΛΑΤΩΝΤΑΣ ΤΟ ΠΑΡΕΛΘΟΝ ΤΟΥ ΤΟΠΟΥ ΜΑΣ».pptx
 
How to Convert Units of Measure
How to Convert Units of MeasureHow to Convert Units of Measure
How to Convert Units of Measure
 
Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing mathematical tex...
Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing  mathematical tex...Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing  mathematical tex...
Συγγραφή μαθηματικού κειμένου με χρήση του XeLaTeX (Writing mathematical tex...
 
Inflected Forms of Nouns and Adjectives
Inflected Forms of Nouns and AdjectivesInflected Forms of Nouns and Adjectives
Inflected Forms of Nouns and Adjectives
 
Learning Simple Phrases in Greek
Learning Simple Phrases in GreekLearning Simple Phrases in Greek
Learning Simple Phrases in Greek
 
Computational Thinking and...the Greek Alphabet
Computational Thinking and...the Greek AlphabetComputational Thinking and...the Greek Alphabet
Computational Thinking and...the Greek Alphabet
 
Το Αποτύπωμα του 1821 στον Τόπο μου
Το Αποτύπωμα του 1821 στον Τόπο μουΤο Αποτύπωμα του 1821 στον Τόπο μου
Το Αποτύπωμα του 1821 στον Τόπο μου
 
Παγκόσμια ημέρα της σταθεράς π=3,14...
Παγκόσμια ημέρα της σταθεράς π=3,14...Παγκόσμια ημέρα της σταθεράς π=3,14...
Παγκόσμια ημέρα της σταθεράς π=3,14...
 

Kürzlich hochgeladen

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

The HTML5 Canvas Element

  • 1. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The HTML5 Canvas Element Apostolos Syropoulos Xanthi, Greece asyropoulos@yahoo.com The Canvas Element for members of the Erasmus+ founded project GAMES
  • 2. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Presentation Outline 1 What is the Canvas Element? 2 Simple Example 3 Playing with Videos 4 Finale
  • 3. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why this all this fuss?
  • 4. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why this all this fuss? The canvas element together with the audio and video elements are the things that make HTML5 shine!
  • 5. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why this all this fuss? The canvas element together with the audio and video elements are the things that make HTML5 shine! Canvas has many applications: interactive movies, games, charts, diagrams, etc.
  • 6. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why this all this fuss? The canvas element together with the audio and video elements are the things that make HTML5 shine! Canvas has many applications: interactive movies, games, charts, diagrams, etc. One can create whole sites with canvas but this is something most people do not recommend.
  • 7. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why this all this fuss? The canvas element together with the audio and video elements are the things that make HTML5 shine! Canvas has many applications: interactive movies, games, charts, diagrams, etc. One can create whole sites with canvas but this is something most people do not recommend. There is no need to use Flash and Action Script anymore!
  • 8. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why this all this fuss? The canvas element together with the audio and video elements are the things that make HTML5 shine! Canvas has many applications: interactive movies, games, charts, diagrams, etc. One can create whole sites with canvas but this is something most people do not recommend. There is no need to use Flash and Action Script anymore! Canvas is free as it is natively supported by all major browsers!
  • 9. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why this all this fuss? The canvas element together with the audio and video elements are the things that make HTML5 shine! Canvas has many applications: interactive movies, games, charts, diagrams, etc. One can create whole sites with canvas but this is something most people do not recommend. There is no need to use Flash and Action Script anymore! Canvas is free as it is natively supported by all major browsers! Canvas is for 2D graphics for 3D graphics we need WebGL: http://arodic.github.io/p/jellyfish/
  • 10. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Checking for support
  • 11. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Checking for support <canvas> Your browser doesn't support "canvas". </canvas>
  • 12. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Checking for support <canvas> Your browser doesn't support "canvas". </canvas> The problem with this approach is that one cannot do anything if the element is not supported!
  • 13. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Checking for support <canvas> Your browser doesn't support "canvas". </canvas> The problem with this approach is that one cannot do anything if the element is not supported! However, we live in 2018 and all major browsers support this element!
  • 14. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simplest Example
  • 15. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simplest Example <!DOCTYPE html> <html><head> <meta charset="UTF-8"> <title>Canvas Example</title> </head> <body> <canvas id="canvas1" width="200" height="200"> Your browser doesn't support "canvas".</canvas> <script> var can = document.getElementById('canvas1'); var ctx = can.getContext('2d'); ctx.beginPath() ctx.moveTo(100,10); ctx.lineTo(150,140); ctx.lineTo(60,110); ctx.closePath(); ctx.fillStyle = 'lime'; ctx.strokeStyle = 'purple'; ctx.lineWidth = 4; ctx.fill(); ctx.stroke(); </script></body></html>
  • 16. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output of the Example
  • 17. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output of the Example
  • 18. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The <video> element revisited
  • 19. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The <video> element revisited One can embed videos in web pages as we already know.
  • 20. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The <video> element revisited One can embed videos in web pages as we already know. <video id="myVideo" width="720" height = "404"> <source src="sample-video.webm" type="video/webm"> <track src="sample-video.vtt" label="Greek subtitles" kind="subtitles" srclang="el" default></track> </video>
  • 21. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The <video> element revisited One can embed videos in web pages as we already know. <video id="myVideo" width="720" height = "404"> <source src="sample-video.webm" type="video/webm"> <track src="sample-video.vtt" label="Greek subtitles" kind="subtitles" srclang="el" default></track> </video> This contains subtitles! And to make it autostart:
  • 22. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The <video> element revisited One can embed videos in web pages as we already know. <video id="myVideo" width="720" height = "404"> <source src="sample-video.webm" type="video/webm"> <track src="sample-video.vtt" label="Greek subtitles" kind="subtitles" srclang="el" default></track> </video> This contains subtitles! And to make it autostart: <script> var video = document.getElementById("myVideo"); video.autoplay = true; video.load(); </script>
  • 23. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A <video> over a <canvas>
  • 24. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A <video> over a <canvas> When specifying a <video> element and a <canvas> element, then the video is reproduced on the canvas.
  • 25. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A <video> over a <canvas> When specifying a <video> element and a <canvas> element, then the video is reproduced on the canvas. Let us see an example.
  • 26. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simple animation with JavaScript
  • 27. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simple animation with JavaScript A ball that follows the mouse.
  • 28. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simple animation with JavaScript A ball that follows the mouse. A bouncing ball.
  • 29. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Animation Libraries
  • 30. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Animation Libraries https://www.createjs.com/easeljs
  • 31. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Animation Libraries https://www.createjs.com/easeljs http://phaser.io/
  • 32. The HTML5 Canvas Element Syropoulos What is the Canvas Element? Simple Example Playing with Videos Finale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Finale Thank you very much for your attention!