Audio files and WWW - html

I need to find good way of embedding audio files on a website.
I find out about the based tag in HTML5. But there is an issue of playing music in other format than .mp3 in Firefox and Opera.
The player should be also similar in each browser.
Can you recommend me anything?

HTML5 <audio> is the way to do what you want.
There are shims for browsers that don't already support <audio>, and you can offer fallback formats using the <source> tag, for maximum cross-browser compatibility.
More reading, if you're still unsure:
<Audio> fallback through Javascript
Native audio in the browser
Quick Guide to Implementing the HTML5 Audio Tag (with Fallback to Flash)

Related

whats the best way to play audio on all browsers?

I'm having a nightmare trying to get <audio> ... </audio> to work on all browsers. I have to include ogg and mp3 and wav files to get one file to show up in ever browser. Is there an easier way, that is html5 looking? I haven't looked into any jquery libraries or anything yet.
Try, Audio.JS, it is a nice package for audio playback...
audio.js is a drop-in javascript library that allows HTML5’s tag to be used anywhere.
Link to Audio.js

create an anchor tag for wmv file that works on all browsers

I want to add a link(wmv file) to my page that would work across all the browsers. Currently, the link is embedded automatically on the page in IE8. I could add an object tag with object type="video/x-ms-wmv" but that would work only in windows not on mac.
My video
wmv is a proprietary media format that is only supported by certain plugins. You will not get universal support for it.
If you want to embed video with good browser support then you need to use a mixture of codecs and container formats.
You can use HTML 5 video with webm for most, falling back to HTML 5 video with h.264 for a couple of browsers, and then Flash for everything else.

HTML audio and embed Tag

which is better to use: embed or audio tag? I'm using Adobe Dreamweaver CS5. and i don't know which is the best tag to use for my audio file... please explain the differences, pros and cons.
Certainly audio tag...
http://www.w3schools.com/html/html5_audio.asp
That's why they introduced it...
It offers
audio play/pause,
navigation controls,
Autoplay;
Looping;
the best part: NO APP/PLUGIN REQUIRED!!!
Lighter pages, as in no plugin.... :)
Only con: Limited audio format support as of now...
Difference:
embed tag is used to embed any external object requiring plugin in your page...
audio tag is a dedicated tag for audio inclusion in your page, without plugin
Both tags are kind of new, because they were introduced by HTML5 and supported by newest versions of all major browsers. This means that there are probably no compatibility differences between them and it is best to use them in accordance with their semantic meaning and what they were meant to be used for:
embed: The tag defines embedded content, such as a plug-in. http://www.w3schools.com/html5/tag_embed.asp
audio: The tag defines sound, such as music or other audio streams. http://www.w3schools.com/html5/tag_audio.asp

Embeding a Video in HTML4 vs HTML5

While searching for difference between HTML4 and HTML5 I came across the point that :
HTML5 brings a whole new dimension to web world. It can embed video on web-pages without using any special software like Flash
So if we will consider a sample code in HTML4 then for embeding video then that will be:
<embed src="MyVideo.mp4"/>
While the above code can be written in HTML5 will be:
<video src="MyVideo.mp4"></video>
So what can I see is just the syntax difference. Apart from that what else is the difference.
Does this mean if we will use HTML5 to embed a video then the browser is not going to use any third parties software to play the video?
The idea regarding the tag is that the browsers should have native support for it, without the use of any additional software. The standard is not yet ready, and one of the points not agreed upon is regarding what codecs to support. For more information you could have a look at the html5 video wiki page which includes a list of which browsers support what formats.
If you are planning on implementing the html5 video tag, you should provide backwards compatibility. One way is to use the VideoJS library, which will fall back to flash, if the browser doesn't support the video source.
The current HTML5 draft specification does not specify which video formats browsers should support in the video tag. User agents are free to support any video formats they feel are appropriate. In cases where decoders are not built into the browser, the format support will be dictated by the multimedia framework of the operating system.
Here is what you might want to see : 20 Examples of HTML5 Video Player with Source
VideoJS is an HTML5 Video Player, built with Javascript and CSS, with a fallback to a Flash video player for when the browser doesn't support HTML5 video.

Support and display different video formats in IE and Firefox browser

We have a need to support rendering of the following type of videos using a common code, based on the URL of the video. We need to support IE 6, IE 8 and Firefox 3.0.4 browsers for following file types (videos).
Can you suggest if we can provide a common HTML tags or set of common HTML tags for supporting all these video types based on the URL? Are all these file extensions supported in Firefox and IE?
asx, asf, ram, mpeg, mpg, mpe, qt, mov, avi, movie, wmv, smil, mp4, mxf, gxf, flv, 3gp, f4v, mj2, omf, dv, vob
Thanks.
Not all of those video formats will be supported on all platforms - it depends on what browser is being used, and which codecs have been installed.
An ideal solution would be Video for Everybody. It is a simple fallback technique that uses Flash where browsers don't support HTML5 video (thus, IE6/7/8). It still won't support every format in your list (You may need server-side transcoding for that), but will cover all the browsers you require.