English 中文(简体)
Flash implementation of `<audio>` and `<video>` tags for HTML 5?
原标题:

I am trying to convert our all-flash website to HTML 5. But since so many users still use IE and other browsers that do not support HTML 5 yet, I am looking for some flash media players that can replace <audio> and <video>. My google skill does not yield good results. The flash media player should dispatch events specified at https://developer.mozilla.org/En/Using_audio_and_video_in_FireFox (or at least talk to javascript some how for those events).

Do you know a flash media player that can easily be embedded inside <audio> or <video> and talks to javascript for events?

问题回答

you should use some server side for doing that. basically you check the user User-Agent and if it s IE you just put your current flash based content. If it s firefox and other put the HTML5 content.

Note: it also possible to use some javascript to achieve same goal.

Any instance of Adobe Flash Player within an HTML page would not be able to parse the tags within the page themselves... the tags are read by the browser, which invokes the plugin, and so the browser would notice VIDEO/AUDIO tags way before the Player would have a chance to change things.

But have you looked at some of the conditional markup/script approaches to determining browser capability? Kroc Camen had one of the first big attempts on this subject, and I m not certain of other entrants in the field right now, but here s a starting point: http://camendesign.com/code/video_for_everybody

(I m not sure about "all Flash sites" in general, because Flash is generally used within HTML, but an "all HTML5 site" would seem even shakier than that, at least at this stage. Your decision though.)





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签