W3C home > Mailing lists > Public > public-html@w3.org > February 2013

Re: idea for video tag and audio tag

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Fri, 15 Feb 2013 17:15:09 +1100
Message-ID: <CAHp8n2m0-Rc+Od1zQbeNY0jktMza7-44GWSq68xkTRJKSMsTKQ@mail.gmail.com>
To: GIDEON ISAAC <mad.gideon.isaac@hotmail.com>
Cc: public-html@w3.org
On Tue, Jan 29, 2013 at 11:49 AM, GIDEON ISAAC <mad.gideon.isaac@hotmail.com
> wrote:

>  I have a website that lets people add information on videos and audio to
> my database.  When they enter the URL of the video, the website plays it
> for a second using the HTML5 video tag, which allows it to find information
> such as height and width and duration.  (With audio it would just be
> duration).  But it would also help if there was a way to get:
> 1. video codec
> 2. audio codec (both audio and video files have this)
> 3. video type - though this is usually obvious.
> It would be great if there was a set of 3 properties that you could read
> in javascript to obtain this information.

You can't get such information about an image file through a JavaScript API
You have to do a XMLHttpRequest to get the header of the file and decode
and analyse it in JavaScript if you want more information about the type of
a file (something along this

> A reason to have this: once you have the information, you can then
specify it all when you play the videos, which makes it easier for the

If you're getting it via the video through a JS API, why would you want to
tell the browser about it again? It was the one to give you this
information in the first place.

> (It also helps you know if the browser supports the video codec or type).

That's what canPlayType() is for.

Received on Friday, 15 February 2013 06:16:01 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:31 UTC