Created by Abram Hindle abram dot hindle at ualberta dot ca Department of Computing Science University of Alberta Edmonton, Alberta, Canada Earth
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Use the <audio> tag, and specify 2 formats one could use and ask the audio tag for controls.
<audio id="basicaudio" controls> <source src="music/KIMIKO_ISHIZAKA_-_Goldberg_Variations_BWV_988_-_05_-_Variatio_4_a_1_Clav.__44k-24b.mp3" type="audio/mpeg" /> <source src="music/KIMIKO_ISHIZAKA_-_Goldberg_Variations_BWV_988_-_05_-_Variatio_4_a_1_Clav.__44k-24b.ogg" type="audio/ogg" /> </audio>
What do Different Codecs mean?
Theora isn't that popular.
oggenc soundfile.wav
lame soundfile.wav
Be sure to return proper mime-types for each video type in the HTTP headers!
Also ensure that you use the type attributes for source videos so that browsers can choose the appropriate one!
There are many relevant events to fill in onpause onplay onerror onended oncanplay onseeking
Important methods and properties video.play() - play video.pause() - pause video.volume -- volume 0.0 to 1.0 video.currentTime - current playback time (or sets it!)
Copyright 2014 (C) Abram Hindle
The textual components of this slide deck are placed under the Creative Commons Attribute-ShareAlike 4.0 International License (CC BY-SA 4.0)
The source code to this slide deck is:
Copyright (C) 2013 Hakim El Hattab, http://hakim.se Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN