SlideShare a Scribd company logo
6
Most read
8
Most read
11
Most read
HTML AUDIO & VIDEO
SESSION 11
Aptech Computer Education
Presented by Muhammad Ehtisham Siddiqui (BSCS)
1
Objectives
 Describe the need for multimedia in HTML5
 List the supported media types in HTML5
 Explain the audio elements in HTML5
 Explain the video elements in HTML5
 Explain the accessibility of audio and video
elements
 Describe how to deal with non-supporting
browsers
Presented by Muhammad Ehtisham Siddiqui (BSCS)
2
Introduction
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
3
 Traditionally, Web browsers were capable of handling only graphics
and text
 Suppose, if a user had to play some video, then, a distinct program,
plug-in, or an ActiveX control had to be installed.
 Earlier, Web designers and Web developers used to set up Web
pages to play audio and video on the Web using Adobe Flash
player.
 Multimedia is a combination of various elements such as video,
graphics, sound, and text. A common way of inserting a multimedia
content on Web pages is by embedding a video or audio file in the
Web page.
Multimedia Support
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
4
Container Video Codec Audio Codec
Mp4 H.264 AAC
Ogg Theora Vorbis
WebM VP8 Vorbis
Audio in HTML5
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
5
 The <audio> element will help the developer to embed music on the Web site and
allow the user to listen to music.
 The <audio> element is one of the best features in HTML5.
 This feature allows the user to enable a native audio file within the Web browser.
 The <audio> tag specifies the audio file to be used in the HTML document.
 The src attribute is used to link to the audio file.
Audio in HTML5(Code)
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
6
<!DOCTYPE html>
<html>
<head>
<title>audio element</title>
</head>
<body>
<audio src=”d:sourcecodesaudio.mp3” controls autoplay loop>
html5 audio not supported
</audio>
</body>
</html>
Audio Attributes in HTML5
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
7
Audio
Attributes
Description
autoplay This attribute identifies whether to start the audio or not once
the object is loaded. The attribute accepts a boolean value
which when specified will automatically start playing the
audio as soon as possible without stopping
autobuffer This attribute starts the buffering automatically
controls This attribute identifies the audio playback controls that
should be displayed such as resume, pause, play, and
volume buttons
preload This attribute identifies whether the audio has to be loaded
when the page loads and is ready to execute. This preload
attribute is ignored if autoplay exists
src This attribute specifies the location or the URL of the audio
file that has to be embedded
Videos in HTML 5
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
8
 The <video> element is a new feature added in HTML5.
 The user can use the <video> element for embedding the video content on the Web
page.
 The easiest way to specify the video is by using the src attribute which give the URL
of the video file to be used.
 Suppose, if the browser does not support the <video> element then the content
between the start tag and end tag is displayed on the browser.
Videos in HTML 5 (Code)
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
9
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<video src=”D:Source codesmovie.mp4”>
Your browser does not support the video.
</video>
</body>
</html>
Videos in HTML 5 (Code 2)
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
10
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<video height=“200” width=“200” controls>
<source src=”myvideo.mp4” type=”video/mp4”>
<source src=”myvideo.webm” type=”video/webm”>
<track src=”eng.vtt” label=”English p subtitles” kind=”subtitles” srclang=”en” >
</video>
</body>
</html>
HTML5 Video Attributes
Presented by Muhammad Ehtisham Siddiqui
(BSCS)
11
Attribute Description
autoplay Specifies that the browser will start playing the video as
soon as it is ready
muted Allows to mute the video initially, if this attribute is existing
controls Allows displaying the controls of the video, if the attribute
exists
loop Specifies that the browser should repeat playing the
existing video once more if the loop attribute exists and
accepts a boolean value
preload Specifies whether the video should be loaded or not when
the page is loaded
src Specifies the location of the video file to be embedded
Questions?
Presented by Muhammad Ehtisham Siddiqui (BSCS)
12

More Related Content

PPTX
Html media
PPTX
HTML5 audio & video
PPTX
Html notes with Examples
PPTX
Html ppt
PPTX
Images and Tables in HTML
PPSX
Introduction to Html5
PPT
Advanced Cascading Style Sheets
PDF
Html text and formatting
Html media
HTML5 audio & video
Html notes with Examples
Html ppt
Images and Tables in HTML
Introduction to Html5
Advanced Cascading Style Sheets
Html text and formatting

What's hot (20)

PPTX
HTML 5: Audio And Video
PPTX
Complete Lecture on Css presentation
PPTX
(Fast) Introduction to HTML & CSS
PPT
PHP - Introduction to File Handling with PHP
PDF
Introduction to HTML5
PDF
Bootstrap
PPTX
Web html table tags
PPTX
HTML (Web) basics for a beginner
PPT
PPTX
Lab #2: Introduction to Javascript
PPTX
Sessions in php
PPTX
Html forms
PDF
Html frames
PPT
Asp.net.
PDF
Html forms
PPTX
HTTP request and response
PDF
Introduction to HTML
PPTX
Bootstrap 3
PPT
Web Development using HTML & CSS
PPT
Html basics
HTML 5: Audio And Video
Complete Lecture on Css presentation
(Fast) Introduction to HTML & CSS
PHP - Introduction to File Handling with PHP
Introduction to HTML5
Bootstrap
Web html table tags
HTML (Web) basics for a beginner
Lab #2: Introduction to Javascript
Sessions in php
Html forms
Html frames
Asp.net.
Html forms
HTTP request and response
Introduction to HTML
Bootstrap 3
Web Development using HTML & CSS
Html basics
Ad

Similar to Html audio video (20)

PPTX
Html 5 full course
PPTX
Lecture9 web design and development
PDF
PPTX
HTML5 - Audio/Video Encoding
PPTX
HTML Multimedia.pptx
PPTX
Use of Multimedia tag in HTML using exmples
PDF
Basics of HTML5 for Phonegap
PPTX
PDF
Html5 Media 1st Edition Kevin Martin Shelley Powers
PPT
Working with Video and Audio
PPTX
HTML Video and Audio.pptx( code of enter html video and audio)
PPT
Intro to HTML5 audio tag
PPTX
Html multimedia
PPTX
Replacing flash with HTML5 and CSS3
PDF
HTML5 Comprehensive Guide
PPT
Html5 tags
PPT
05-06 HTML lecture FOR BS STUDENTS IUB.ppt
KEY
Looking into HTML5 + CSS3
PPTX
HTML 5 Basics Part Two
PPTX
Designing web pages html videos
Html 5 full course
Lecture9 web design and development
HTML5 - Audio/Video Encoding
HTML Multimedia.pptx
Use of Multimedia tag in HTML using exmples
Basics of HTML5 for Phonegap
Html5 Media 1st Edition Kevin Martin Shelley Powers
Working with Video and Audio
HTML Video and Audio.pptx( code of enter html video and audio)
Intro to HTML5 audio tag
Html multimedia
Replacing flash with HTML5 and CSS3
HTML5 Comprehensive Guide
Html5 tags
05-06 HTML lecture FOR BS STUDENTS IUB.ppt
Looking into HTML5 + CSS3
HTML 5 Basics Part Two
Designing web pages html videos
Ad

More from Muhammad Ehtisham Siddiqui (20)

PPTX
C programming Tutorial Session 4
PPTX
C programming Tutorial Session 4
PPTX
C programming Tutorial Session 3
PPTX
C programming Tutorial Session 2
PPTX
C programming Tutorial Session 1
PPTX
HTML5 Web storage
PPTX
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
PPTX
JavaScript Session 2
PPTX
JavaScript Session 3
PPTX
Javascript session 1
PPTX
Html 5 geolocation api
PPTX
Buiding Next Generation Websites Session 8 by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites Session 6 by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites Session6
PPTX
Building Next Generation Websites Session5
PPTX
Building Next Generation Websites Session4
PPTX
Office session14
C programming Tutorial Session 4
C programming Tutorial Session 4
C programming Tutorial Session 3
C programming Tutorial Session 2
C programming Tutorial Session 1
HTML5 Web storage
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
JavaScript Session 2
JavaScript Session 3
Javascript session 1
Html 5 geolocation api
Buiding Next Generation Websites Session 8 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 6 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session6
Building Next Generation Websites Session5
Building Next Generation Websites Session4
Office session14

Recently uploaded (20)

PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PPTX
20th Century Theater, Methods, History.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
Virtual and Augmented Reality in Current Scenario
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Introduction to Building Materials
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
Empowerment Technology for Senior High School Guide
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
IGGE1 Understanding the Self1234567891011
PDF
advance database management system book.pdf
PDF
1_English_Language_Set_2.pdf probationary
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Introduction to pro and eukaryotes and differences.pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
20th Century Theater, Methods, History.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
B.Sc. DS Unit 2 Software Engineering.pptx
Virtual and Augmented Reality in Current Scenario
FORM 1 BIOLOGY MIND MAPS and their schemes
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Introduction to Building Materials
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Empowerment Technology for Senior High School Guide
A powerpoint presentation on the Revised K-10 Science Shaping Paper
IGGE1 Understanding the Self1234567891011
advance database management system book.pdf
1_English_Language_Set_2.pdf probationary
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Introduction to pro and eukaryotes and differences.pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx

Html audio video

  • 1. HTML AUDIO & VIDEO SESSION 11 Aptech Computer Education Presented by Muhammad Ehtisham Siddiqui (BSCS) 1
  • 2. Objectives  Describe the need for multimedia in HTML5  List the supported media types in HTML5  Explain the audio elements in HTML5  Explain the video elements in HTML5  Explain the accessibility of audio and video elements  Describe how to deal with non-supporting browsers Presented by Muhammad Ehtisham Siddiqui (BSCS) 2
  • 3. Introduction Presented by Muhammad Ehtisham Siddiqui (BSCS) 3  Traditionally, Web browsers were capable of handling only graphics and text  Suppose, if a user had to play some video, then, a distinct program, plug-in, or an ActiveX control had to be installed.  Earlier, Web designers and Web developers used to set up Web pages to play audio and video on the Web using Adobe Flash player.  Multimedia is a combination of various elements such as video, graphics, sound, and text. A common way of inserting a multimedia content on Web pages is by embedding a video or audio file in the Web page.
  • 4. Multimedia Support Presented by Muhammad Ehtisham Siddiqui (BSCS) 4 Container Video Codec Audio Codec Mp4 H.264 AAC Ogg Theora Vorbis WebM VP8 Vorbis
  • 5. Audio in HTML5 Presented by Muhammad Ehtisham Siddiqui (BSCS) 5  The <audio> element will help the developer to embed music on the Web site and allow the user to listen to music.  The <audio> element is one of the best features in HTML5.  This feature allows the user to enable a native audio file within the Web browser.  The <audio> tag specifies the audio file to be used in the HTML document.  The src attribute is used to link to the audio file.
  • 6. Audio in HTML5(Code) Presented by Muhammad Ehtisham Siddiqui (BSCS) 6 <!DOCTYPE html> <html> <head> <title>audio element</title> </head> <body> <audio src=”d:sourcecodesaudio.mp3” controls autoplay loop> html5 audio not supported </audio> </body> </html>
  • 7. Audio Attributes in HTML5 Presented by Muhammad Ehtisham Siddiqui (BSCS) 7 Audio Attributes Description autoplay This attribute identifies whether to start the audio or not once the object is loaded. The attribute accepts a boolean value which when specified will automatically start playing the audio as soon as possible without stopping autobuffer This attribute starts the buffering automatically controls This attribute identifies the audio playback controls that should be displayed such as resume, pause, play, and volume buttons preload This attribute identifies whether the audio has to be loaded when the page loads and is ready to execute. This preload attribute is ignored if autoplay exists src This attribute specifies the location or the URL of the audio file that has to be embedded
  • 8. Videos in HTML 5 Presented by Muhammad Ehtisham Siddiqui (BSCS) 8  The <video> element is a new feature added in HTML5.  The user can use the <video> element for embedding the video content on the Web page.  The easiest way to specify the video is by using the src attribute which give the URL of the video file to be used.  Suppose, if the browser does not support the <video> element then the content between the start tag and end tag is displayed on the browser.
  • 9. Videos in HTML 5 (Code) Presented by Muhammad Ehtisham Siddiqui (BSCS) 9 <!DOCTYPE HTML> <html> <head> </head> <body> <video src=”D:Source codesmovie.mp4”> Your browser does not support the video. </video> </body> </html>
  • 10. Videos in HTML 5 (Code 2) Presented by Muhammad Ehtisham Siddiqui (BSCS) 10 <!DOCTYPE HTML> <html> <head> </head> <body> <video height=“200” width=“200” controls> <source src=”myvideo.mp4” type=”video/mp4”> <source src=”myvideo.webm” type=”video/webm”> <track src=”eng.vtt” label=”English p subtitles” kind=”subtitles” srclang=”en” > </video> </body> </html>
  • 11. HTML5 Video Attributes Presented by Muhammad Ehtisham Siddiqui (BSCS) 11 Attribute Description autoplay Specifies that the browser will start playing the video as soon as it is ready muted Allows to mute the video initially, if this attribute is existing controls Allows displaying the controls of the video, if the attribute exists loop Specifies that the browser should repeat playing the existing video once more if the loop attribute exists and accepts a boolean value preload Specifies whether the video should be loaded or not when the page is loaded src Specifies the location of the video file to be embedded
  • 12. Questions? Presented by Muhammad Ehtisham Siddiqui (BSCS) 12

Editor's Notes

  • #2: Presentation slide for courses, classes, lectures et al.
  • #3: Beginning course details and/or books/materials needed for a class/project.
  • #4: Beginning course details and/or books/materials needed for a class/project.
  • #5: Beginning course details and/or books/materials needed for a class/project.
  • #6: Beginning course details and/or books/materials needed for a class/project.
  • #7: Beginning course details and/or books/materials needed for a class/project.
  • #8: Beginning course details and/or books/materials needed for a class/project.
  • #9: Beginning course details and/or books/materials needed for a class/project.
  • #10: Beginning course details and/or books/materials needed for a class/project.
  • #11: Beginning course details and/or books/materials needed for a class/project.
  • #12: Beginning course details and/or books/materials needed for a class/project.
  • #13: Example graph/chart.