HTML5 Drawing Canvas and Video

Slides:



Advertisements
Similar presentations
More CSS - Page layout + HTML5 new features Boriana Koleva Room: C54
Advertisements

SHAREPOINT PAKISTAN USER GROUP #1 SHAREPOINT COMMUNITY IN PAKISTAN AND ASIA HTML5 and SharePoint 2013.
HTML 5 Previous version: HTML4.01, 1999 Still work in progress, most browsers support some of it.
Chapter 15 HTML 5 Video and Audio Intro to HTML5 1.
  Just another way to collect pieces together (like div, section)  Anything can be in there  Formatting just like all other elements.
Audio and Video on the Web Sec 5-12 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
Web Programming Language Week 13 Ken Cosh HTML 5.
IT Engineering I Instructor: Rezvan Shiravi
Introduction What is it? What does this mean? Features Animated Logo Html5 Flash Canvas Tunneler Html5 Animation Html5 Canvas Caching.
Music composition with HTML 5-Canvas. Abstarct Online version music editor. Easy to use, just need some simple direction. Everyone can be a musician.
MIS 425 Lecture 3 – HTML 5 and CSS Instructor: Martin Neuhard
Our Examples Video Capture Working With Interactive Video Objects Buttons symbols – are areas on the monitor that a sensitive to user actions such.
Creating User Interfaces Recap HTML/HTML5 JavaScript features Homework: keep working on user observation studies. Review JavaScript.
HTML 5 Overview Lachlan Hunt PubCon, Las Vegas
CS 174: Web Programming October 5 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
Computer Science and Software Engineering© 2014 Project Lead The Way, Inc. HTML5 Evolving Standards JavaScript.
How the Web Works Building a Website – Lesson 1. How People Access the Web Browsers People access websites using software called a web browser. To view.
Week 2- Overview of the internet The construction of a webpage Four Key Elements – how the internet works Elements and Design concepts Introduction to.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
IS2802 Introduction to Multimedia Applications for Business Lecture 8: JavaScript and Cookies Rob Gleasure
Browser Compatibility Testing, using different browsers Conditional Statements.
Introduction of Presented by Neetu sharma MCA (8 th trim)
HTML5 and CSS3 Illustrated Unit F: Inserting and Working with Images.
Lecture 9: Extra Features and Web Design Tarik Booker CS 120 California State University, Los Angeles.
Part – 3 : HTML 5 SVG Tag. † SVG stands for Scalable Vector Graphics. † SVG is used to define vector-based graphics for the Web. † SVG defines the graphics.
INTRODUCTION ABOUT DIV Most websites have put their content in multiple columns. Multiple columns are created by using or elements. The div element is.
HTML Structure & syntax
Chapter 9 HTML 5 Video and Audio
The HTML5 logo was introduced by W3C in 2010
Web Basics: HTML/CSS/JavaScript What are they?
Objective % Select and utilize tools to design and develop websites.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 9 HTML 5 Video and Audio
4.01 Cascading Style Sheets
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
CMPE 280 Web UI Design and Development September 12 Class Meeting
Inserting and Working with Images
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 4: HTML5 Media - <video> & <audio>
Web Programming Language
Process of Converting “PSD to HTML”
Objective % Select and utilize tools to design and develop websites.
* Lecture 26 Manifest Asynchrony
Server Side Programming Overview And file system basics
Introduction to Databases with MAMP/LAMP/WAMP thrown in!
CSU CT 310, Web Development ©Ross Beveridge
CT Web Development, Colorado State University
* Lecture 12 Mapping, Map Reduction Summing integers,
The Canvas.
Handling Files In particular, uploading files.
Tables from Arrays of Objects Exploding Strings
Content Management and WordPress
HTML Basics & Context & IDEs & Server Basics & Online Notes
* Lecture 22 Images * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Introduction to AJAX and the migration toward applications
MySQL Tables and Relations 101
Introduction to Web Page Design
* Lecture 5 PHP Basics * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Querying Client Information Forms and Passing Data,
* jQuery * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.
Authentication Stepped Up Persistent User Data Protected Content.
Secure Web Programming
Drawing Graphics in JavaScript
HTML Basics & Context & IDEs & Server Basics & Online Notes
Lecture 4 Cascading Style Sheep.
Creating User Interfaces
Loops and Conditionals Generating , Reading files.
4.01 Cascading Style Sheets
Alternatives to our approach
Presentation transcript:

HTML5 Drawing Canvas and Video * Lecture 23 HTML5 Drawing Canvas and Video * Course logo spider web photograph from Morguefile openstock photograph by Gabor Karpati, Hungary.

CSU CT 310, Web Development, ©Ross Beveridge The Canvas A general purpose drawing canvas Many of the standard capabilities: Curves, filled solids, text, effects, … Learning curve probably depends, Conventions look standard to one familiar with multiple graphic APIs. Brief introduction here through an animated spinny. 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge PHP/HTML Code Not much happening here … Here is a blank … (what shall we call it? :-) where drawing will later take place. 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge CSS Code Not much here either but see background … In case we never discussed it before, placing an image into a part of a page using CSS is very different from using an HTML img tag. 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

Spinny.js – Setup/Globals. Note the use of the Math library. Also think about how theta will be made to vary with time. CSU CT 310, Web Development, ©Ross Beveridge 11/14/2018

Spinny.js – Initialization. The animation is set in motion using a JavaScript initialization function. function init() { stones = document.getElementById("stones"); contxt = stones.getContext('2d'); placeDots(); setTimeout(doStep, 100); } 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge Spinny.js – Place Dots. There are ten dots. Each drawn by the drawDot function. function placeDots() { contxt.clearRect(0, 0, stones.width, stones.height); for (i = 0; i < 10; i++) { row = voff + (radius * Math.cos(theta + (i * delta))); col = hoff + (radius * Math.sin(theta + (i * delta))); drawDot(row, col, (1.0 - i/10)); } 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge Spinny.js – Draw Dot. With HTML5 we see a true 2D API. Drawing contexts. Paths, arcs, fills & strokes. function drawDot(xpos, ypos, alpha) { contxt.beginPath(); contxt.globalAlpha = alpha; contxt.arc(xpos, ypos, dotr, 0, 2 * Math.PI, false); contxt.fillStyle = '#ff3f04'; contxt.fill(); contxt.strokeStyle = '#000000';; contxt.lineWidth = 2; contxt.stroke(); } 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge More on HTML5 Drawing 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310 Web Development ©Ross Beveridge & Jamie Ruiz Change of Topic: Video CSU CT 310 Web Development ©Ross Beveridge & Jamie Ruiz 11/14/2018

Web Video – Ancient History May 2005 Managing video formats was nightmarishly complex, often leading to Flash! 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge HTML5 Video – Better! 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge Two Formats Emerging Webm Unencumbered by I.P. claims, hence OpenSource Compatible Backed by Google H2.64 (MPEG4) Good quality, well supported, but … Users are expected to pay license/royalty 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

CSU CT 310, Web Development, ©Ross Beveridge So, encode with both … 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge

Plays on Firefox, Safari, … CSU CT 310, Web Development, ©Ross Beveridge 11/14/2018

CSU CT 310, Web Development, ©Ross Beveridge The HTML (5) Code. Think about a list of options and then the browser moves down the list until it finds a suitable option. 11/14/2018 CSU CT 310, Web Development, ©Ross Beveridge