-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
looks good....
comments inline:
Stjepan Rajko wrote:
Hi Michael,
After thinking about the multiple ways in which we want to specify
sources to a <video> for mv_embed, I decided to go with some classes
that read whatever sources are specified in whatever way, and then
provide that information to the rest of mv_embed through a generic
interface. I have implemented two classes:
mediaSource represents a single source, and is currently just a <type,
uri> tuple
mediaElement is a collection of mediaSources, and it knows how to
initialize itself from a <video> element (it will read in the <video>
src and/or the child <source> elements and/or the <video> roe file).
It also guesses MIME types - later we can make it check the file
itself.
For example, with the following HTML:
<video
roe="http://metavid.ucsc.edu/wiki/index.php?title=Special:MvExportStre…
src="http://www.archive.org/download/mv_senate_proceeding_12-23-07/sen…
<source
src="http://www.archive.org/download/mv_senate_proceeding_12-23-07/sen…
</video>
it will construct the following mediaSources:
Adding mediaSource of type video/x-flv and uri
http://www.archive.org/download/mv_senate_proceeding_12-23-07/senate_procee…
(from <video>)
Adding mediaSource of type video/x-flv and uri
http://www.archive.org/download/mv_senate_proceeding_12-23-07/senate_procee…
(from <source>)
Adding mediaSource of type video/mp4 and uri
http://www.archive.org/download/mv_senate_proceeding_08-01-07/senate_procee…
(from ROE..)
looks good and per html5 spec... ROE request won't necessarily be
executed on every display of media. As we discussed on IRC...the html
with internal embeds where you don't want the script to hit the roe file
will be verbose while external embeds will only have the roe attribute.
Adding mediaSource of type video/mp4 and uri
http://www.archive.org/download/mv_senate_proceeding_08-01-07/senate_procee…
Adding mediaSource of type video/mpeg and uri
http://www.archive.org/download/mv_senate_proceeding_08-01-07/senate_procee…
Adding mediaSource of type video/mpeg-2 and uri
http://www.archive.org/download/mv_senate_proceeding_08-01-07/senate_procee…
Adding mediaSource of type video/x-flv and uri
http://www.archive.org/download/mv_senate_proceeding_08-01-07/senate_procee…
Adding mediaSource of type video/ogg and uri
http://128.114.20.64/media/senate_proceeding_08-01-07.ogg.anx?t=0:06:00/0:0…
Adding mediaSource of type video/ogg and uri
http://128.114.20.64/media/senate_proceeding_08-01-07.ogg.anx?t=0:06:00/0:0…
Adding mediaSource of type text/cmml and uri
http://metavid.ucsc.edu/wiki/index.php?title=Special:MvExportStream&str…
Adding mediaSource of type text/cmml and uri
http://metavid.ucsc.edu/wiki/index.php?title=Special:MvExportStream&str…
Adding mediaSource of type text/cmml and uri
http://metavid.ucsc.edu/wiki/index.php?title=Special:MvExportStream&str…
Eventually, the mediaElement will be able to answer queries like
"getAllSourcesOfMIMEType(...)", and serve as a proxy to a chosen
source (either the default source, or specified source of certain
type...). I will get that functionality added as I modify the rest of
the code to use mediaElement rather than querying the information
directly.
cool this should tie into the plugin capabilities (will have to turn the
plugin list into a plugin array). So we can match plugin players to
supported MIME types. For example vlc and mplayer support flv video...
This gets a bit more complicated once we include client side seeking per
player but should be doable.
Also, I started playing with constructing docs. JSDocs seems to work OK:
http://urbanstew.org/js_docs_out (or
http://www.dancinghacker.com/js_docs_out/ - the other server seems to
be down now :-( )
great! documentation ... it does not seem to grab all the methods but
maybe that can be fixed somehow:)
One question: I couldn't find where $j.each(...)
is coming from
(where is it coming from?). It's a cool way of iterating through a
node.
that is a jQuery based iterator
http://jquery.bassistance.de/api-browser/#eachObjectFunction
It seems to be one of the few good ways for cross browser iterating over
xml nodes. There is probably more opportunities to streamline other code
with jquery functions. You should take a look at jquery its fun :)
- --michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFIRLygPPG4QoAtd8MRArCWAJ4zoto1aNBBncJ3ztf7Pbn68AcYugCfapsJ
SLJfV0dhlv0nDVd79Se2Fpo=
=ga3h
-----END PGP SIGNATURE-----