| 10:36 | <maikmerten> | hello |
| 10:41 | <maikmerten> | once again some stuff on the media elements... http://metavid.ucsc.edu/blog/2007/06/07/html5-video-the-future-is-now/ - this script will "enable" <video> for all browsers. If native <video> support is present the script will just keep the DOM as-is - if <video> it'll embed a Java applet to play back the media, and if Java isn't there it'll try to use <embed> and hope the client has a proper plugin |
| 10:41 | <maikmerten> | the problem I see: As far as I see there's no way to detect if the <video> implementation a certain format |
| 10:42 | <maikmerten> | I think you'll have to try to put a video on the page and see if it throws an error |
| 10:42 | <maikmerten> | (e.g. http://www.whatwg.org/specs/web-apps/current-work/#mediaerrdecode ) |
| 10:44 | <maikmerten> | now... we're in year 2015, browsers are around that support various MPEG codecs, Ogg Theora, Ogg Dirac, Hyper L33t codec and whatever |
| 10:44 | <maikmerten> | so the script would try to embed Ogg Theora... it fails.... now it'll go for Ogg Dirac.... nope. Then it goes for MPEG... nope. Ah, Hyper L33t works, pfew, lucky us |
| 10:45 | <maikmerten> | that may or may not take its time |
| 10:45 | <maikmerten> | so I wonder if media elements should carry some sort of information to carry information about formats supported |
| 10:46 | <maikmerten> | trial and error may not work in the long run |
| 10:58 | <maikmerten> | (oh, and rereading my stuff I wrote above I can only say.... insert verbs wherever suitable... gargh) |
| 12:00 | <annevk> | Lachy, you mean "Hixie, please sort this out"? |
| 12:00 | <annevk> | (re: offline resources) |
| 12:01 | <annevk> | maikmerten, why not just include all the <source> elements? |
| 12:01 | annevk | doesn't see the need for inspecting first |
| 12:01 | <webben_> | maikmerten: How does your script handle fallback content for <video>? |
| 12:01 | <webben_> | <noembed> and alt? |
| 12:02 | <maikmerten> | annevk, the problem is that some content vendors only have a certain subset of formats available as fallbacks |
| 12:03 | <annevk> | maikmerten, just give the UA all the alternative <source> elements |
| 12:03 | <maikmerten> | so if vendor A only has files in format B it may be good to know if this format is supported before using <video> |
| 12:03 | <annevk> | why? |
| 12:03 | <annevk> | the UA won't fetch stuff it doesn't support |
| 12:03 | <annevk> | it will iterate through <source> |
| 12:03 | <annevk> | (unless <video> has src= specified) |
| 12:04 | <maikmerten> | hmm... k. So a media error is only thrown if ALL given sources fail |
| 12:04 | <annevk> | I think a media error is thrown only once a resource is actually fetched and it appears it isn't supported or can't be decoded |
| 12:05 | <maikmerten> | webben_, well, that script (it's not mine) just assumes <video> will support Ogg, there's no check to see if that has gone wrong |
| 12:05 | <maikmerten> | webben_, however, if <video> isn't supported at all it'll go for a Java applet to decode the video |
| 12:06 | <webben_> | I'm not talking about video not being supported so much as embed not being supported. |
| 12:06 | <webben_> | (or being disabled) |
| 12:08 | <maikmerten> | well, actually that script seems to use <object> for plugin fallbacks |
| 12:09 | <maikmerten> | oh, and <embed> as nested fallback for that |
| 12:09 | <maikmerten> | http://metavid.ucsc.edu/wiki_dev/mv_embed/mv_embed.js |
| 12:10 | <maikmerten> | annevk, well, as more crude example: The Wikipedia player first determines what options are available, then does document.write stuff to embed a viable solution. No DOM manipulation afterwards, it's basically Netscape 3 compatible stuff (blame this on me, I've provided the logic) |
| 12:11 | <maikmerten> | so once it determined "well, yes, there's a <video> tag with a play() method" it'll use that |
| 12:11 | <maikmerten> | which of course goes completely wrong if the browser doesn't happen to support that particular format |
| 12:12 | <annevk> | you can insert <video><source src=ogg type=someoggtype> <source src=mpg type=somempgtype> </video> ... |
| 12:12 | <maikmerten> | personally I'd like to know what it supports without trying... as trying would most likely also have server interaction |
| 12:12 | <annevk> | that would not be compatible with Opera's implementation fwiw, but the idea is that that's how <video> will work |
| 12:12 | <maikmerten> | yeah |
| 12:12 | <annevk> | of course, you can still do <video src=ogg> in which case the <source> elements will be ignored |
| 12:13 | <annevk> | maybe we should define it that <video src=> is the final fallback... |
| 12:13 | <annevk> | that would make the whole thing "backwards compatible"... |
| 12:13 | <maikmerten> | I have to read what the type attribute is working like |
| 12:14 | <maikmerten> | if I can specify <video src="blubb.ogg" type="application/ogg"> and that thing throws an error without first trying to download and play back the file if Ogg is not supported everything is perfectly fine |
| 12:14 | <maikmerten> | (or whatever valid value for type) |
| 12:15 | <annevk> | type= is not on <video> |
| 12:16 | <Lachy> | annevk: I didn't intend to imply for Hixie to have to sort it out himself :-), I just wanted to let others know about it and start a discussion incase someone knows more about it |
| 12:16 | <maikmerten> | annevk, ah, stupid me |
| 12:16 | <maikmerten> | annevk, no wonder I missed that ;) |
| 12:18 | <maikmerten> | annevk, but right, if <source src="blubb.media" type="application/someformat"> immediately makes sure the <video> element reports back an error if application/someformat isn't supported that's a rather elegant thing |
| 12:18 | <annevk> | Lachy, well, it has been around for several months and the Firefox guys so far have not submitted stuff... |
| 12:18 | <annevk> | iirc |
| 12:18 | <annevk> | I don't think it returns an error... |
| 12:19 | <annevk> | But you're able to find out if it does something with it... |
| 12:19 | annevk | needs to study <video> some more at some point |
| 12:20 | <maikmerten> | would "<video id='file.media'><source type='some/mimetype'></video>" be a valid construction to determine if some/mimetype is supported? |
| 12:20 | <maikmerten> | I'd hope for the media element to have MEDIA_ERR_DECODE set |
| 12:21 | <annevk> | I think <source> would need to have src= set as well |
| 12:21 | <annevk> | However, I think the right way to go around it is to simply use it |
| 12:22 | <annevk> | and render let the fallback content handle it if it's not supported |
| 12:23 | <maikmerten> | okay, thanks for clarifying these issues |
| 12:24 | <maikmerten> | I now see all use cases that'd make sense being covered |
| 13:27 | <kfish> | anyone working on open source implementations of <video>, please consider coming to http://www.annodex.org/events/foms2008/ |