JSFiddle - React, Tailwind, and code Playground

by josekerekes

HTML

<audio controls>
  <source src="http://www.w3schools.com/html/horse.ogg" type="audio/ogg">
  <source src="http://www.w3schools.com/html/horse.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

<video width="500" height="200" controls>
  <source src="http://www.w3schools.com/html/movie.mp4" type="video/mp4">
</video>

JavaScript

//Containers

//ogg = vorbis
//mp4 = AAC


//video
//webm - vp8 video - vorbis - made by google for replacing mp4
//ogg - theora video -vorbis
//mp4 -h264 + aac

//attributes
/*
src
autoplay //not on mobile devices
loop
controls
muted
preload  //(none, metadata, auto)  metadata get length, width, height
type*/

//miro -- save video in diff formats


//mime type
//mp3 - audio/mpeg
//mp4 - audio/mp4 video/mp4
//ogg  - audio/ogg video/ogg